@xmtp/wasm-bindings 0.0.15 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,10 +1,23 @@
1
1
  # WASM bindings for the libXMTP rust library
2
2
 
3
3
  > [!CAUTION]
4
- > These bindings are currently in alpha and under heavy development. The API is subject to change and it is not yet recommended for production use.
4
+ > These bindings are currently in alpha and under heavy development. The API is
5
+ > subject to change and it is not yet recommended for production use.
5
6
 
6
7
  ## Useful commands
7
8
 
9
+ Requires the emscripten toolchain to build
10
+
8
11
  - `yarn`: Installs all dependencies (required before building)
9
- - `yarn build`: Build a release version of the WASM bindings for the current platform
12
+ - `yarn build`: Build a release version of the WASM bindings for the current
13
+ platform
10
14
  - `yarn lint`: Run cargo clippy and fmt checks
15
+ - `yarn check:macos`: Run cargo check for macOS (requires Homebrew and `llvm` to
16
+ be installed)
17
+
18
+ # Publishing
19
+
20
+ To release a new version of the bindings, update the version in `package.json`
21
+ with the appropriate semver value and add an entry to the CHANGELOG.md file.
22
+ Once merged, manually trigger the `Release WASM Bindings` workflow to build and
23
+ publish the bindings.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xmtp/wasm-bindings",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "WASM bindings for the libXMTP rust library",
@@ -24,10 +24,9 @@
24
24
  "directory": "bindings_wasm"
25
25
  },
26
26
  "scripts": {
27
- "build": "yarn clean && yarn build:web && yarn build:copy && yarn clean:release",
28
- "build:web": "cargo xtask build BindingsWasm --out-dir ./dist --plain -- --release",
29
- "build:copy": "node scripts/copyFiles.js",
30
- "clean:release": "rm -f ./dist/package.json",
27
+ "build": "yarn clean && yarn build:web",
28
+ "build:web": "RUSTFLAGS=\"-Ctarget-feature=+bulk-memory,+mutable-globals\" wasm-pack build --target web --out-dir ./dist --no-pack --release",
29
+ "check:macos": "CC_wasm32_unknown_unknown=/opt/homebrew/opt/llvm/bin/clang cargo check --target wasm32-unknown-unknown",
31
30
  "clean": "rm -rf ./dist",
32
31
  "lint": "yarn lint:clippy && yarn lint:fmt",
33
32
  "lint:clippy": "cargo clippy --locked --all-features --target wasm32-unknown-unknown --no-deps -- -D warnings",