wasmer-pack package icon
wasmer/wasmer-pack
Public
wasmer run wasmer/wasmer-pack

Wasmer Pack

Continuous integration

(API Docs | Project Docs)

Import your WebAssembly code just like any other dependency.

Getting Started

The easiest way to get started by installing with the wasmer-pack CLI.

$ cargo install wasmer-pack-cli
$ wasmer-pack --version
wasmer-pack-cli 0.5.2

We also need the WAPM package we are generating bindings for. One option is to create your own, but for convenience we'll use the wasmer/wasmer-pack-cli package from WAPM.

$ curl -sSO https://registry-cdn.wapm.io/packages/wasmer/wasmer-pack-cli/wasmer-pack-cli-0.5.2.tar.gz
$ tar -xzvf wasmer-pack-cli-0.5.2.tar.gz
$ tree .
.
├── wapm.toml
├── wasmer-pack-cli-0.5.2.tar.gz
└── wasmer-pack.wasm

0 directories, 2 files

Now we've got everything we need to generate Python bindings to the wasmer/wasmer-pack-cli package.

$ wasmer-pack python . --out-dir ./py
$ tree py
py
├── MANIFEST.in
├── pyproject.toml
└── wasmer_pack_cli
    ├── commands
    │   ├── __init__.py
    │   └── wasmer_pack.wasm
    ├── __init__.py
    └── py.typed

2 directories, 6 files

We can generate JavaScript bindings with a similar command

$ wasmer-pack js . --out-dir ./js
$ tree ./js
./js
└── package
    ├── package.json
    └── src
        ├── commands
        │   ├── wasmer-pack.d.ts
        │   ├── wasmer-pack.js
        │   └── wasmer-pack.wasm
        ├── index.d.ts
        └── index.js

3 directories, 6 files

Check out the tutorial for more.

License

This project is licensed under the MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT).

It is recommended to always use cargo crev to verify the trustworthiness of each of your dependencies, including this one.

The WebAssembly interface to wasmer-pack.


Github
More packages
A code generator that lets you treat WebAssembly modules like native dependencies.
The WebAssembly interface to wit-pack.
The WebAssembly interface to wit-pack.
ayushjha avatar
ayushjha
ayushjha avatar
ayushjha
The WebAssembly interface to wit-pack.
Michael Bryan
Michael Bryan
Michael Bryan
Michael Bryan
baran/testing-pack-resovution website
A code generator that lets you treat WebAssembly modules like native dependencies.
A code generator that lets you treat WebAssembly modules like native dependencies.
habuayush avatar
habuayush
habuayush avatar
habuayush
A code generator that lets you treat WebAssembly modules like native dependencies.
आयुष झा (Ayush Jha)
आयुष झा (Ayush Jha)
आयुष झा (Ayush Jha)
आयुष झा (Ayush Jha)
A code generator that lets you treat WebAssembly modules like native dependencies.
ayushjha avatar
ayushjha
ayushjha avatar
ayushjha
A code generator that lets you treat WebAssembly modules like native dependencies.
Michael Bryan
Michael Bryan
Michael Bryan
Michael Bryan

Making software universally accessible