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

cargo odra build -p contracts #86

Open
zie1ony opened this issue May 23, 2024 · 0 comments
Open

cargo odra build -p contracts #86

zie1ony opened this issue May 23, 2024 · 0 comments

Comments

@zie1ony
Copy link
Contributor

zie1ony commented May 23, 2024

cargo odra build tries to compile whole workspace, but this works, so it should do exactly this call:

ODRA_MODULE=Cep18 cargo build --target wasm32-unknown-unknown --release -p contracts --bin contracts_build_contract

Our old friend is back:

error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the "js" feature. For more information see: https://docs.rs/getrandom/#webassembly-support
   --> /Users/ziel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.15/src/lib.rs:342:9
    |
342 | /         compile_error!("the wasm*-unknown-unknown targets are not supported by \
343 | |                         default, you may need to enable the \"js\" feature. \
344 | |                         For more information see: \
345 | |                         https://docs.rs/getrandom/#webassembly-support");
    | |________________________________________________________________________^

The solution is to have only one member of the workspace with the crate with contracts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 Discuss
Development

No branches or pull requests

1 participant