kylejeske / wasmer-js

Monorepo for Javascript WebAssembly packages by Wasmer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wasmer-JS styled with prettier Build Status Dev Dependencies

Monorepo of multiple JavaScript packages enabling easy use of WebAssembly Modules in Node and the Browser.

Wasm Terminal Example

Wasm Terminal Demo Gif

Contributing

For additional contribution guidelines, please see our CONTRIBUTING.md and our Code of Conduct.

Quick Start

To get started contributing to wasmer-js, create your own fork of the wasmer-js repository by clicking "Fork" in the Web UI.

  1. Download / Clone your fork to a local repository. Navigate into the project directory.

  2. Install the dependencies with npm install. NOTE: This will run lerna bootstrap, and build the neccessary JS Packages.

  3. Run npm run build. It will bundle JS Packages into './dist' directory.

  4. Run npm run dev, which will serve the examples/wasm-shell example, which can be accessed with: http://localhost:8000/examples/wasm-shell/index.html

To make changes to any of the sub projects, they can be tested by either: Running their local tests with npm run test in their respective package directory, or by running their watch for changes developement command with npm run dev.

Using Lerna

Please see the website for lerna for a quick introduction into what it is. Here are some general notes about using lerna in this project:

  • Packages can be added by simply creating a new directory within the packages/ directory, and running npm init in this new package directory. Then, the new package must be botstraped using learna. For this project, this can be done running npm run lerna:bootstrap in the base project directory.

  • To add new dependencies and keep build times low, devDependencies (not CLI dependencies) must be added to the root package.json file. Project installation / runtime dependencies are managed for each package individually.

  • Sibling JS packages can depend on one another. You can do this by using @lerna/add. For example, lerna add @wasmer/package-1 --scope=@wasmer/package-2 will add @wasmer/package-1@^1.0.0 to @wasmer/package-2

About

Monorepo for Javascript WebAssembly packages by Wasmer

License:MIT License


Languages

Language:JavaScript 52.9%Language:WebAssembly 47.0%Language:TypeScript 0.1%Language:Rust 0.0%Language:Shell 0.0%Language:C 0.0%Language:Makefile 0.0%