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

error[E0658]: using an imported function as entry point main is experimental #450

Open
yamt opened this issue Jul 17, 2024 · 1 comment · May be fixed by #452
Open

error[E0658]: using an imported function as entry point main is experimental #450

yamt opened this issue Jul 17, 2024 · 1 comment · May be fixed by #452

Comments

@yamt
Copy link
Contributor

yamt commented Jul 17, 2024

i saw the following error while doing "cmake --build build/toolchain --target dist".
i guess rust/cargo requirements should be documented in https://github.com/WebAssembly/wasi-sdk?tab=readme-ov-file#requirements.

error[E0658]: using an imported function as entry point `main` is experimental
 --> /Users/yamamoto/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-component-ld-0.5.5/src/main.rs:1:5
  |
1 | use wasm_component_ld::main;
  |     ^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #28937 <https://github.com/rust-lang/rust/issues/28937> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `wasm-component-ld` (bin "wasm-component-ld") due to 1 previous error
error: failed to compile `wasm-component-ld v0.5.5`, intermediate artifacts can be found at `/var/folders/74/hw1sphgx0lv63q6pq_n5grw00000gn/T/cargo-installJIGQGF`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
ninja: build stopped: subcommand failed.
@alexcrichton
Copy link
Collaborator

Yes this is a toolchain error where the Rust toolchain you're using is too old. Once bytecodealliance/wasm-component-ld#36 gets published you'll get a better first-class error message when the toolchain is too old.

yamt added a commit to yamt/wasi-sdk that referenced this issue Jul 18, 2024
@yamt yamt linked a pull request Jul 18, 2024 that will close this issue
yamt added a commit to yamt/wasi-sdk that referenced this issue Aug 29, 2024
it seems that the build issue mentioned in
WebAssembly#450
has been fixed by wasm-component-ld 0.5.6.
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

Successfully merging a pull request may close this issue.

2 participants