Skip to content

Add note on no_std #371

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

Closed
wants to merge 7 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ changes from the `main` branch:
openzeppelin-stylus = { git = "https://github.com/OpenZeppelin/rust-contracts-stylus" }
```

> [!NOTE]
> This library is designed to be `no_std`. When using it in your project, ensure that your dependencies are not importing the standard library. You can achieve this by setting `default-features = false` for relevant dependencies in your `Cargo.toml`. For example:
>
> ```toml
> [dependencies]
> alloy-primitives = { version = "=0.7.6", default-features = false }
> ```
>
> This avoids errors such as `found duplicate lang item 'panic_impl'` when running `cargo stylus check`.

Once defined as a dependency, use one of our pre-defined implementations by
importing them:

Expand Down
Loading