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

Add example / implementation for coap-handler #107

Conversation

chrysn
Copy link
Collaborator

@chrysn chrysn commented Oct 3, 2023

The coap-handler trait provides a means for servers to be implemented in a portable way across CoAP stacks. For example, it can be served from the coap crate, or from RIOT-OS. This PR adds an example of how to run an EDHOC server on there.

On the long run, this may spin into a standalone crate that pulls together EDHOC, OSCORE and CWT implementations; for the time being, it serves me as a test bed for making sure that this can be used even on very minimal CoAP implementations. I'm making this into a PR so that a) it's easier to show where requirements such as those behind #104 come from, and b) because I think it may make for a more versatile demo than the current one (at least when duly polished, at which point it'll go from draft PR into PR).

This branch is based on remove-hacspec, in particular because it depends on #104.

@geonnave
Copy link
Collaborator

geonnave commented Oct 4, 2023

Feel free to target main now that remove-hacspec has been merged.

@chrysn chrysn force-pushed the coap-example-using-coap-handler branch 2 times, most recently from 27f0ff2 to 34b712b Compare October 5, 2023 08:25
@geonnave geonnave added the enhancement New feature or request label Oct 9, 2023
@malishav
Copy link
Contributor

malishav commented Nov 4, 2023

@chrysn what is the status of this PR? It seems it passes the CI but it is still marked as a draft. Could you rebase on top of latest main?

@chrysn
Copy link
Collaborator Author

chrysn commented Nov 4, 2023

Rebasing; all I'll change to replace dependency wildcards.

@chrysn chrysn force-pushed the coap-example-using-coap-handler branch from 34b712b to 67f2140 Compare November 4, 2023 16:05
@chrysn chrysn marked this pull request as ready for review November 4, 2023 16:05
@chrysn chrysn force-pushed the coap-example-using-coap-handler branch from 67f2140 to 1e30db5 Compare November 4, 2023 16:08
@chrysn chrysn force-pushed the coap-example-using-coap-handler branch from 1e30db5 to 5d048be Compare November 4, 2023 16:16
}

fn main() {
let mut stack = std_embedded_nal::Stack::default();
Copy link
Collaborator

@geonnave geonnave Nov 4, 2023

Choose a reason for hiding this comment

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

@chrysn do you think it would make sense to rename this to network_stack? At first I was thinking it was the program stack 🙃.

@malishav malishav merged commit ae2012f into openwsn-berkeley:main Nov 4, 2023
24 checks passed
@chrysn chrysn deleted the coap-example-using-coap-handler branch November 4, 2023 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants