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

Regenerate bindings using wai-bindgen (requires MSRV 1.64) #3389

Closed
wants to merge 2 commits into from

Conversation

Michael-F-Bryan
Copy link
Contributor

@Michael-F-Bryan Michael-F-Bryan commented Nov 29, 2022

Note: This depends on wasmerio/wai#20 and a v0.2.2 release of wai-bindgen-cli! It also requires bumping our MSRV to 1.64.

In c1b2b08, we accidentally updated the regenerate.sh script to run cargo install wai-bindgen instead of wai-bindgen-cli (the crate with the executable).

That version of the wai-bindgen CLI also didn't include wasmerio/wai@fbea20f which adds a --force-generate-structs flag to the wai-bindgen rust-wasm ... sub-command.

This PR updates the regenerate.sh script to prompt users to install wai-bindgen-cli with the desired version if they haven't already. I've also regenerated the types to make sure --force-generate-structs works as intended.

Closes #3387.

@theduke
Copy link
Contributor

theduke commented Nov 29, 2022

We need to pin wai-bindgen to a fixed version .

Ideally we'd switch to Rust based generation with a dependency instead of the script. (xtask style).

But we can just use install --force with a fixed version for now.

@theduke
Copy link
Contributor

theduke commented Nov 29, 2022

Closes #3387 .

@Michael-F-Bryan
Copy link
Contributor Author

Yep, agreed, this feels like the perfect place for a cargo xtask.

We do also have the slight problem that the wai project uses Rust 1.64 so it can inherit Cargo.toml metadata, whereas Wasmer's MSRV is 1.63.

$ cargo check
error: package `wai-bindgen-gen-rust v0.2.1` cannot be built because it requires rustc 1.64 or newer, while the currently active rustc version is 1.63.0

@Michael-F-Bryan Michael-F-Bryan changed the title Regenerate bindings using wai-bindgen Regenerate bindings using wai-bindgen (requires MSRV 1.64) Nov 29, 2022
@theduke
Copy link
Contributor

theduke commented Dec 13, 2022

This was rewritten in #3422 to generate code with a Rust CLI instead.

@theduke theduke closed this Dec 13, 2022
@theduke theduke mentioned this pull request Dec 13, 2022
@Michael-F-Bryan Michael-F-Bryan deleted the generate-wasi-types-with-wai-bindgen branch April 28, 2023 01:50
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 this pull request may close these issues.

Fix and Update wasi-types Generation
2 participants