Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support did_dht_resolution in C #390

Merged
merged 3 commits into from
Oct 11, 2024
Merged

Conversation

andresuribe87
Copy link
Contributor

What type of PR is this? (check all applicable)

  • ♻️ Refactor
  • ✨ New Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 👷 Example Application
  • 🧑‍💻 Code Snippet
  • 🎨 Design
  • 📖 Content
  • 🧪 Tests
  • 🔖 Release
  • 🚩 Other

Description

Adds support for did_dht_resolution in a C ABI.

Let me know if it's cool to include the tokio runtime web5_c library that's being built by the bindc recipe.

Related Tickets & Documents

N/A - couldn't find any. I wanted to add this because I'm aiming to extend curl so that it can handle did protocols. This is critical in order to promote interop. Since curl is written in C, this is a simple first step to use the rust-core to power the curl fork I'll be working on.

Mobile & Desktop Screenshots/Recordings

N/A

Added code snippets?

  • 👍 yes
  • 🙅 no, because they aren't needed

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

No tests? Add a note

The provided example code is the test itself. There is a README with the explanation.

Added to documentation?

  • 📜 readme
  • 📜 contributing.md
  • 📓 general documentation
  • 🙅 no documentation needed

No docs? Add a note

Added a README that explains how to run the given code.

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

Copy link

github-actions bot commented Oct 9, 2024

TBD Spec Test Vectors Report (web5-core-kt)

Total Test VectorsTotal Test Cases✅ Passed❌ Failed⚠️ Skipped
183300
ℹ️ 3 out of 18 test vectors passed successfully.

❌ Missing Vectors (15)

These are test vectors without any test cases.
FeatureName
Credentialscreate
Credentialsverify
CryptoEs256ksign
CryptoEs256kverify
DidDhtcreate
DidDhtresolve
DidWebresolve
PortableDidparse
PresentationExchangecreate_presentation_from_credentials
PresentationExchangeevaluate_presentation
PresentationExchangeselect_credentials
PresentationExchangevalidate_definition
PresentationExchangevalidate_submission
VcJwtdecode
VcJwtverify

Automatically generated at: 2024-10-11T16:01:32.183Z

Copy link

github-actions bot commented Oct 9, 2024

TBD Spec Test Vectors Report (web5-rs)

Total Test VectorsTotal Test Cases✅ Passed❌ Failed⚠️ Skipped
185500
ℹ️ 5 out of 18 test vectors passed successfully.

❌ Missing Vectors (13)

These are test vectors without any test cases.
FeatureName
Credentialscreate
CryptoEs256ksign
CryptoEs256kverify
DidDhtcreate
DidWebresolve
PortableDidparse
PresentationExchangecreate_presentation_from_credentials
PresentationExchangeevaluate_presentation
PresentationExchangeselect_credentials
PresentationExchangevalidate_definition
PresentationExchangevalidate_submission
VcJwtdecode
VcJwtverify

Automatically generated at: 2024-10-11T15:58:11.360Z

} else {
match unsafe { CStr::from_ptr(gateway_url).to_str() } {
Ok(s) => Some(s.to_string()),
Err(_) => return ptr::null_mut(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at some point we should introduce better error handling over the C FFI, but it's not necessary at this moment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created #392 to track.

Copy link
Contributor

@KendallWeihe KendallWeihe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well done 👏

@andresuribe87 andresuribe87 merged commit 4193238 into main Oct 11, 2024
21 checks passed
@andresuribe87 andresuribe87 deleted the c_and_did_dht_resolution branch October 11, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants