Skip to content

Commit 5e14313

Browse files
committed
improve readme
1 parent bc1646c commit 5e14313

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,21 @@ changes from the `main` branch:
3434
openzeppelin-stylus = { git = "https://github.com/OpenZeppelin/rust-contracts-stylus" }
3535
```
3636

37+
> [!NOTE]
38+
> This library is designed to be `no_std`, which helps reduce wasm size. 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:
39+
>
40+
> ```toml
41+
> [dependencies]
42+
> alloy-primitives = { version = "=0.7.6", default-features = false }
43+
> ```
44+
>
45+
> If you want to use it on an `std` environment, you will have to set the `std` flag when importing OpenZeppelin Contracts, otherwise you will get an error `found duplicate lang item 'panic_impl'` when building the project.
46+
>
47+
> ```toml
48+
> [dependencies]
49+
> openzeppelin-stylus = { version = "0.1.0", features = ["std"] }
50+
> ```
51+
3752
Once defined as a dependency, use one of our pre-defined implementations by
3853
importing them:
3954

0 commit comments

Comments
 (0)