jwcesign opened PR #8204 from jwcesign:main
to bytecodealliance:main
:
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->With following following dependencies:
[dependencies] wasmtime = "1.0.0"
It will has error:
-> # cargo run Updating crates.io index Compiling wasmtime_hello v0.1.0 (/root/workspace/git/wasmtimelearn/wasmtime_hello) error[E0107]: method takes 3 generic arguments but 2 generic arguments were supplied --> src/main.rs:33:25 | 33 | let answer = answer.typed::<(), i32>(&store)?; | ^^^^^ -- --- supplied 2 generic arguments | | | expected 3 generic arguments | note: method defined here, with 3 generic parameters: `Params`, `Results`, `S` --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-1.0.2/src/func.rs:1200:12 | 1200 | pub fn typed<Params, Results, S>(&self, store: S) -> Result<TypedFunc<Params, Results>> | ^^^^^ ------ ------- - help: add missing generic argument | 33 | let answer = answer.typed::<(), i32, S>(&store)?; | +++ For more information about this error, try `rustc --explain E0107`. error: could not compile `wasmtime_hello` (bin "wasmtime_hello") due to 1 previous error
Let's update to the latest wasmtime crate.
jwcesign requested elliottt for a review on PR #8204.
jwcesign requested wasmtime-default-reviewers for a review on PR #8204.
jwcesign edited PR #8204:
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->With the following dependencies:
[dependencies] wasmtime = "1.0.0"
It will have the error:
-> # cargo run Updating crates.io index Compiling wasmtime_hello v0.1.0 (/root/workspace/git/wasmtimelearn/wasmtime_hello) error[E0107]: method takes 3 generic arguments but 2 generic arguments were supplied --> src/main.rs:33:25 | 33 | let answer = answer.typed::<(), i32>(&store)?; | ^^^^^ -- --- supplied 2 generic arguments | | | expected 3 generic arguments | note: method defined here, with 3 generic parameters: `Params`, `Results`, `S` --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmtime-1.0.2/src/func.rs:1200:12 | 1200 | pub fn typed<Params, Results, S>(&self, store: S) -> Result<TypedFunc<Params, Results>> | ^^^^^ ------ ------- - help: add missing generic argument | 33 | let answer = answer.typed::<(), i32, S>(&store)?; | +++ For more information about this error, try `rustc --explain E0107`. error: could not compile `wasmtime_hello` (bin "wasmtime_hello") due to 1 previous error
Let's update to the latest wasmtime crate.
alexcrichton commented on PR #8204:
Thanks! I think inevitably we'll continue to forget to update this, so mind changing it to a recommendation to use
cargo add wasmtime
instead of showing TOML itself? That should continue to work into the future since that picks the latest version.
jwcesign updated PR #8204.
jwcesign commented on PR #8204:
Thanks! I think inevitably we'll continue to forget to update this, so mind changing it to a recommendation to use
cargo add wasmtime
instead of showing TOML itself? That should continue to work into the future since that picks the latest version.Updated, thanks for reminding
jwcesign updated PR #8204.
alexcrichton submitted PR review.
alexcrichton merged PR #8204.
Last updated: Dec 23 2024 at 12:05 UTC