Skip to content

Commit

Permalink
[mbf-wasm] Adds wasm flag to mbf (MystenLabs#11257)
Browse files Browse the repository at this point in the history
## Description 

- adds a WASM feature for `move-binary-format` crate 
- adds a `@mysten/move-binary-format` package (private)

- adds a `move-binary-format` package to `sdk/`
- adds tests and pnpm setup
- adds a readme
- builds for node and for web

## Test Plan 

- Features tests

### Type of Change (Check all that apply)

- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes

Adds a prototype of the `move-binary-format` adapted for wasm. Currently private - not published to npm.
  • Loading branch information
damirka authored Sep 7, 2023
1 parent 961173f commit ab571e5
Show file tree
Hide file tree
Showing 17 changed files with 1,149 additions and 117 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/turborepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ jobs:
turbo-${{ runner.os }}-
- name: Lint
run: pnpm turbo lint
- name: Install wasm-pack for mbf package
uses: jetli/wasm-pack-action@v0.4.0
with:
version: 'latest'
- name: Build
run: pnpm turbo build
- name: Test
Expand Down
40 changes: 20 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ exclude = [
"external-crates/move/tools/read-write-set",
"external-crates/move/tools/read-write-set/dynamic",
"external-crates/move/tools/read-write-set/types",
"sdk/move-binary-format",
]

members = [
Expand Down
15 changes: 9 additions & 6 deletions external-crates/move/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions external-crates/move/move-binary-format/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ arbitrary = { version = "1.1.7", optional = true, features = ["derive"] }
enum-compat-util = { path = "../testing-infra/enum-compat-util"}
move-proc-macros = { path = "../testing-infra/move-proc-macros"}

# wasm support (requires js feature of getrandom)
getrandom = { version = "0.2.9", features = ["js"], optional = true }

[dev-dependencies]
proptest = "1.0.0"
proptest-derive = "0.3.0"
Expand All @@ -31,3 +34,4 @@ serde_json = "1.0.64"
[features]
default = []
fuzzing = ["proptest", "proptest-derive", "arbitrary", "move-core-types/fuzzing"]
wasm = ["getrandom"]
Loading

0 comments on commit ab571e5

Please sign in to comment.