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

Use rust version 1.81 to build WASM #1291

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cedar-wasm/build-wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@

set -e
main () {
# This should be enforced by the `rust-toolchain` file in this directory,
# but this will cause CI to fail-fast if that's not configured correctly.
echo 'Checking rustc version'
if ( cargo rustc -- --version | grep --invert-match "rustc 1.81" ) ; then
echo 'Unexpected rustc version. Wasm bindings expect to be built on Rust verison 1.81, check `cargo rustc --version`.'
exit 1
fi

rm -rf pkg || true
mkdir pkg
cargo build
Expand Down
6 changes: 6 additions & 0 deletions cedar-wasm/rust-toolchain
john-h-kastner-aws marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Workaround for wasm-bindgen issue resulting in malformed return type `Array`
# without any generic parameter when building with Rust version 1.82. We pin
# this crate to 1.81 to avoid build failures. We plant to delete this once the
# issue is resolved: https://github.com/cedar-policy/cedar/issues/1292
[toolchain]
channel = "1.81"
Loading