Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 919 Bytes

CONTRIBUTING.md

File metadata and controls

40 lines (24 loc) · 919 Bytes

Contributing

Prerequisites

  • You need to have rustup installed, and when you run cargo build or cargo test it will use the nightly rust version that is defined in rust-toolchain in the root of the repo.
  • You need to run rustup target add wasm32-unknown-unknown to download this target for your system
  • You need to install wasm-pack https://rustwasm.github.io/wasm-pack/

Running

CLI:

cargo run ./sample/component.gjs

Tests:

cargo test:

Build the package:

  • npm install
  • npm run build

which will output your wasm package in ./pkg

Running against a local copy of SWC

In Cargo.toml, replace all of git = "https://github.com/ef4/swc.git", branch = "content-tag" with path = "../swc/crates/the_crate_name.

In VSCode, you can search:

([a-z_]+) = \{ git = "https://github.com/ef4/swc.git", branch = "content-tag"

and replace:

$1 = { path = "../swc/crates/$1"