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 support for sapio modules? #243

Open
JeremyRubin opened this issue Oct 29, 2022 · 2 comments
Open

no_std support for sapio modules? #243

JeremyRubin opened this issue Oct 29, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@JeremyRubin
Copy link
Collaborator

it would be nice if we could guarantee sapio modules can work with no std

@ProofOfKeags
Copy link
Collaborator

What does this buy us IRL? And iirc nostd implies no access to an allocator, is that going to be an issue?

@JeremyRubin
Copy link
Collaborator Author

no, you can have an allocator with nostd, you just need to enable the crate (see https://docs.rust-embedded.org/book/intro/no-std.html)

https://www.reddit.com/r/rust/comments/9eyc21/noob_what_exactly_is_no_std_and_why_is_it_so/ has a good answer

no_std exists because std assumes you have an operating system with things like a memory allocator and a file system. This assumption is not true on things like microcontrollers, or when you are the operating system. Rust automatically links std by default, so there has to be a switch to turn it off, or Rust wouldn't be usable in those places.

we don't have access to filesystem APIs, etc, so nostd would avoid things that could be problematic

@ProofOfKeags ProofOfKeags added the enhancement New feature or request label Nov 2, 2022
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

No branches or pull requests

2 participants