GithubHelp home page GithubHelp logo

literallyjustroy / wasmer-pack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wasmerio/wasmer-pack

0.0 0.0 0.0 25.85 MB

License: MIT License

JavaScript 0.38% Python 2.32% Rust 84.94% TypeScript 2.63% Jinja 9.73%

wasmer-pack's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.