Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/actions/rustup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ runs:
-c rust-std \
-c clippy \
-c rustfmt
rustup target add --toolchain "$toolchain" wasm32-unknown-unknown
- name: Save rustup cache
uses: lynx-infra/cache/save@5c6160a6a4c7fca80a2f3057bb9dfc9513fcb732
if: ${{ inputs.save-if == 'true' && steps.restore.outputs.cache-hit != 'true' }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
node-version: "24"
- uses: actions-rust-lang/setup-rust-toolchain@ac90e63697ac2784f4ecfe2964e1a285c304003a # v1
with:
target: wasm32-unknown-unknown
cache-key: test-ubuntu-copilot-setup-steps
- name: Install wasm-bindgen
uses: taiki-e/install-action@14083e64ac8cf1f5e54356df00b9779b23e192a1 # v2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@ac90e63697ac2784f4ecfe2964e1a285c304003a # v1
with:
target: wasm32-unknown-unknown
cache: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
Expand Down
6 changes: 1 addition & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,13 @@ _pnpm_: Make sure that pnpm is available. You can use `corepack enable` to autom
_Rust_: ReactLynx utilizes SWC plugins, necessitating the Rust toolchain for building.

- Ensure you have [`rustup`](https://rustup.rs/) installed.
- Install the required WASM target by running the following command (you only need to do this once):
```sh
rustup target add wasm32-unknown-unknown
```
- `rustup` will automatically use the correct toolchain when you run build commands inside this project, thanks to the `rust-toolchain` file.

### Setup

To setup the project, run:

```sh
rustup toolchain install
pnpm install
```
Comment thread
colinaaa marked this conversation as resolved.

Expand Down
4 changes: 0 additions & 4 deletions packages/web-platform/web-style-transformer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@ inline-style-parser = { path = "../inline-style-parser" }
js-sys = "0.3.77"
lazy_static = "1.5.0"
wasm-bindgen = "=0.2.101"

[profile.release]
opt-level = 3
lto = true
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ execSync(
{ cwd: packageRoot, stdio: 'inherit' },
);
execSync(
`pnpm wasm-opt ./dist/standard_bg.wasm -O3 -o ./dist/standard_bg.wasm`,
`pnpm wasm-opt --enable-bulk-memory ./dist/standard_bg.wasm -O3 -o ./dist/standard_bg.wasm`,
{ cwd: packageRoot, stdio: 'inherit' },
);

Expand All @@ -42,6 +42,6 @@ execSync(
{ cwd: packageRoot, stdio: 'inherit' },
);
execSync(
`pnpm wasm-opt ./dist/legacy_bg.wasm -O3 -o ./dist/legacy_bg.wasm`,
`pnpm wasm-opt --enable-bulk-memory ./dist/legacy_bg.wasm -O3 -o ./dist/legacy_bg.wasm`,
{ cwd: packageRoot, stdio: 'inherit' },
);
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "1.88.0"
targets = ["wasm32-unknown-unknown", "wasm32-wasip1"]
profile = "default"
Loading