diff --git a/Cargo.toml b/Cargo.toml index d005160f04..d2bd2f2fbf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,8 +29,11 @@ members = [ "packages/rs-json-schema-compatibility-validator", "packages/check-features", "packages/wallet-utils-contract", - # "packages/wasm-sdk", # This one is experimental and not ready for use ] + + +exclude = ["packages/wasm-sdk"] # This one is experimental and not ready for use + [workspace.package] rust-version = "1.83" diff --git a/packages/wasm-sdk/.gitignore b/packages/wasm-sdk/.gitignore new file mode 100644 index 0000000000..03314f77b5 --- /dev/null +++ b/packages/wasm-sdk/.gitignore @@ -0,0 +1 @@ +Cargo.lock diff --git a/packages/wasm-sdk/Cargo.toml b/packages/wasm-sdk/Cargo.toml index 3b0d525fd8..785128a917 100644 --- a/packages/wasm-sdk/Cargo.toml +++ b/packages/wasm-sdk/Cargo.toml @@ -1,8 +1,7 @@ [package] name = "wasm-sdk" -version = "0.1.0" edition = "2021" -rust-version.workspace = true +# rust-version.workspace = true publish = false [lib] crate-type = ["cdylib"] diff --git a/packages/wasm-sdk/build.sh b/packages/wasm-sdk/build.sh new file mode 100755 index 0000000000..d9c1016741 --- /dev/null +++ b/packages/wasm-sdk/build.sh @@ -0,0 +1,12 @@ +#! /bin/bash +# +# Build WASM-SDK. +# +# EXPERIMENTAL: This script is experimental and may be removed in the future. +# + +set -ex -o pipefail + +wasm-pack build --target web --release --no-opt +wasm-opt -tnh --flatten --rereloop -Oz --gufa -Oz --gufa -Oz -o pkg/optimized.wasm pkg/wasm_sdk_bg.wasm +ls -lah pkg