Skip to content

Commit c5aefa4

Browse files
authored
Change compiler target to wasm32-wasi (#40)
1 parent 88a37b5 commit c5aefa4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.cargo/config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# These command aliases are not final, may change
22
[alias]
33
# Alias to build actual plugin binary for the specified target.
4-
prepublish = "build --target wasm32-unknown-unknown"
4+
prepublish = "build --target wasm32-wasi"
55

6-
[target.wasm32-unknown-unknown]
6+
[target.wasm32-wasi]
77
rustflags = "-C target-feature=+relaxed-simd"

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,18 @@ jobs:
3737
- name: Install wasm target
3838
shell: bash
3939
run: |
40-
rustup target add wasm32-unknown-unknown
40+
rustup target add wasm32-wasi
4141
4242
- name: Build plugin
4343
shell: bash
44-
run: cargo build --release --target wasm32-unknown-unknown
44+
run: cargo prepublish --release
4545
env:
4646
MACOSX_DEPLOYMENT_TARGET: "10.13"
4747

4848
- name: List files
4949
shell: bash
5050
run: |
51-
ls -al target/wasm32-unknown-unknown/release
51+
ls -al target/wasm32-wasi/release
5252
- name: Configure npm
5353
run: |
5454
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
],
1919
"main": "next_superjson.wasm",
2020
"scripts": {
21-
"prepack": "tsc && cp target/wasm32-unknown-unknown/release/next_superjson.wasm ."
21+
"prepack": "tsc && cp target/wasm32-wasi/release/next_superjson.wasm ."
2222
},
2323
"files": ["tools.*"],
2424
"peerDependencies": {

0 commit comments

Comments
 (0)