Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 2.24 KB

contributing.md

File metadata and controls

55 lines (36 loc) · 2.24 KB

Contributing to the Codebase

Development is based on a standard npm install && npm run build && npm run test workflow.

Tests can be run without bundling via npm run build:dev && npm run test:dev.

Specific tests can be run adding the mocha --grep / -g flag, for example: npm run test:dev -- --grep exports_only.

Prerequisites

Required prerequisites for building jco include:

Rust Toolchain

The latest Rust stable toolchain can be installed using rustup.

Specifically:

rustup toolchain install stable
rustup target add wasm32-wasi

In case you do not have rustup installed on your system, please follow the installation instructions on the official Rust website based on your operating system

Project Structure

jco is effectively a monorepo consisting of the following projects:

Building

To build jco, run:

npm install
npm run build

Testing

There are three test suites in jco:

  • npm run test: Project-level transpilation, CLI & API tests.
  • npm run test --workspace packages/preview2-shim: preview2-shim unit tests.
  • test/browser.html: Bare-minimum browser validation test.
  • cargo test: Wasmtime preview2 conformance tests (not currently passing).