Stream: git-wasmtime

Topic: wasmtime / PR #8204 doc: update wasmtime dep to the lates...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2024 at 07:09):

jwcesign opened PR #8204 from jwcesign:main to bytecodealliance:main:

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please 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.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2024 at 07:09):

jwcesign requested elliottt for a review on PR #8204.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2024 at 07:09):

jwcesign requested wasmtime-default-reviewers for a review on PR #8204.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2024 at 07:10):

jwcesign edited PR #8204:

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please 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.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2024 at 14:49):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 22 2024 at 01:34):

jwcesign updated PR #8204.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 22 2024 at 01:35):

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

view this post on Zulip Wasmtime GitHub notifications bot (Mar 22 2024 at 01:36):

jwcesign updated PR #8204.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 22 2024 at 14:32):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 22 2024 at 14:58):

alexcrichton merged PR #8204.


Last updated: Dec 23 2024 at 12:05 UTC