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

https://wiki.gear-tech.io/docs/getting-started-in-5-minutes error #668

Open
zzz6519003 opened this issue May 11, 2024 · 0 comments
Open

Comments

@zzz6519003
Copy link

failed

RUSTFLAGS="-C link-args=--import-memory -C linker-plugin-lto" \ cargo build --release --target=wasm32-unknown-unknown

This works

Quote:

This command is quite verbose, so you can create cargo config and Rust toolchain override files to make it shorter. Create a .cargo/config.toml file in the counter directory with the following contents:
[build]
target = "wasm32-unknown-unknown"
rustflags = [
"-C", "link-args=--import-memory",
"-C", "linker-plugin-lto",
]

And create a rust-toolchain.toml file in the counter directory with the following contents:

[toolchain]
channel = "stable"
targets = ["wasm32-unknown-unknown"]
profile = "default"

Now build your program with a single command:

cargo build --release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant