Official support for no_std
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
Research direction
Start by reviewing the generated contract code and the repository's CI configuration. Check whether the regular contract modes compile for a no_std consumer, then add a CI check if needed; done means the no_std check passes reliably.
Written by the indexing model from the issue text.
Description
Hi! I found this library after looking for a stable alternative to the unstable contracts API in core::contracts (https://doc.rust-lang.org/core/contracts/index.html)
I really like this crate and I have already used it quite a bit in std contexts. Now I'm working on a no_std project and I'm considering using contracts there as well.
As far as I can tell from the generated code, the regular contract modes seem like they should already be compatible with no_std consumers: the crate itself is a procedural macro, and the generated checks appear to rely on assert!, debug_assert!, concat!, and stringify!, which are available from core.
Would it make sense to officially support no_std by adding a CI check for it?
I think no_std is an important use case here, since contracts are closer to a language feature than to a typical library feature. In other words, they can be useful even in environments without an OS or the standard library.
- Dominant language
- Rust
- Stars
- 51
- Forks
- 2
- Avg merge
- 2h 29m
- Merged PRs (30d)
- 6
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from x52dev/contracts
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
All issues in x52dev/contracts
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100