WASM bindings for the libXMTP rust library
npm install @xmtp/wasm-bindings> [!INFO]
> These bindings are not intended to be used directly, use the associated SDK instead.
1. Install the emscripten toolchain: brew install emscripten. emscripten is used to compile from Rust to WebAssembly.
2. Install LLVM: brew install llvm, and then follow the instructions to add it to your PATH. Emscripten depends on LLVM's Clang (as opposed to Apple's Clang).
- yarn: Installs all dependencies (required before building)
- yarn build: Build a release version of the WASM bindings for the current
platform
- yarn lint: Run cargo clippy and fmt checks
- yarn format:check: Check formatting of integration tests
- yarn typecheck: Run typecheck on integration tests
- yarn test: Run cargo test with wasm32-unknown-unknown target
- yarn test:integration: Run integration tests using vitest
These commands require Homebrew and llvm to be installed. See above.
- yarn check:macos: Run cargo check
- yarn lint:macos: Run cargo clippy and fmt checks
- yarn build:macos: Build a release version of the WASM bindings
- yarn test:integration:macos: Run integration tests using vitest
To release a new version of the bindings, update the version in package.json with the appropriate semver value. Once merged, manually trigger the Release WASM Bindings workflow to build and publish the bindings.