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

no_std + async support #72

Merged
merged 72 commits into from
Jul 22, 2023
Merged

Conversation

ivmarkov
Copy link
Contributor

@ivmarkov ivmarkov commented Jul 21, 2023

As discussed in the matter-rs Matrix room, this is the sequential branch (i.e. no_std + async support).

This PR contains all changes which are already in the no_std and sequential branches of the matter-rs repository, plus the following additions:

  • Built-in support for the embassy-net baremetal async networking library (under the embassy-net feature) - i.e. all necessary dependencies, plus a UdpListener implementation
  • Removed dependency on smol. We only depend on async-io now, and only in the STD UdpListener. We can now also trivially implement a UdpListener for tokio's tokio-net as well, under a tokio feature flag
  • Several simplifications which would hopefully make the examples a bit shorter and easier to understand. Namely:
    • Unification of the Matter, Transport and TransportRunner structs into just Matter, as was in the original main branch
    • Simplified Mdns implementation. MdnsRunner is gone. Just call MdnsRunner::run(...) to run the Mdns responder async loop
    • Simplified Psm implementation. Call Psm::new(&matter, dir) to initialize the persister, and then psm.run() to run the persister async loop
  • UPDATE: Should be Apache 2.0 only - for now. IMPORTANT: Removed ./LICENSE and replaced with ./LICENSE-APACHE and LICENSE-MIT. @kedars I spotted this by accident. Basically, Cargo.toml used to say license=mit, while the LICENSE file used to contain the Apache 2.0 license. I assume you want both (as is the case for 99% of the Rust crates). If you want either Apache-only or MIT-only, please let me know, and I'll remove one or the other

Support for no_std

Further no_std compat
@ivmarkov
Copy link
Contributor Author

I've also switched the openssl dependency to the latest published one (and fixed both the mbedtls and openssl builds).

So upon rename of matter to rs-matter (and the git project itself) we can probably publish in crates.io

@ivmarkov
Copy link
Contributor Author

ivmarkov commented Jul 21, 2023

@kedars Not sure from where the "restyled" thing is kicking in - couldn't see it in the GitHub Actions YAML. But in any case I think we just need to switch to cargo fmt --check instead.

@ivmarkov
Copy link
Contributor Author

By the way, the changeset is so big because it contains also all the commits of the no_std branch. We can squash bits and pieces if you like.

@kedars kedars merged commit 6bbac0b into project-chip:main Jul 22, 2023
5 checks passed
@ivmarkov ivmarkov deleted the sequential-embassy-net branch August 1, 2023 09:52
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.

3 participants