Giter Site home page Giter Site logo

wasm-tools's Introduction

@napi-rs/wasm-tools

https://github.com/napi-rs/wasm-tools/actions

https://github.com/rustwasm/walrus bindings

Install this package

pnpm add @napi-rs/wasm-tools -D
yarn add @napi-rs/wasm-tools -D

Usage

// Generate dwarf info and emit wasm

import { join } from 'node:path'
import { readFile, writeFile } from 'node:fs/promises'
import { fileURLToPath } from 'node:url'

import { ModuleConfig } from '@napi-rs/wasm-tools'

const __dirname = join(fileURLToPath(import.meta.url), '..')

const wasm = await readFile(join(__dirname, 'panic.wasm32-wasi.wasm'))

const binary = new ModuleConfig()
  .generateDwarf(true)
  .generateNameSection(true)
  .generateProducersSection(true)
  .preserveCodeTransform(true)
  .parse(wasm)
  .emitWasm(true)

await writeFile(join(__dirname, 'panic.wasm32-wasi.wasm'), binary)

wasm-tools's People

Contributors

renovate[bot] avatar brooooooklyn avatar

Stargazers

Leon Zhao avatar  avatar dong avatar Zhazha_JiaYiZhen avatar idler avatar Toyo Li avatar Qingmu avatar Jason avatar

Watchers

 avatar liuyi avatar  avatar

wasm-tools's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
Cargo.toml
  • napi 3.0.0-alpha.7
  • napi-build 2
  • napi-derive 3.0.0-alpha.5
  • rustc-demangle 0.1
  • uuid 1
  • walrus 0.21
crates/panic/Cargo.toml
github-actions
.github/workflows/CI.yml
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/setup-node v4
  • actions/cache v4
  • goto-bus-stop/setup-zig v2
  • actions/setup-node v4
  • actions/upload-artifact v4
  • actions/upload-artifact v4
  • actions/checkout v4
  • cross-platform-actions/action v0.25.0
  • actions/upload-artifact v4
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/setup-node v4
  • actions/download-artifact v4
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/setup-node v4
  • actions/download-artifact v4
  • docker/setup-qemu-action v3
  • addnab/docker-run-action v3
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/setup-node v4
  • actions/download-artifact v4
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/setup-node v4
  • actions/download-artifact v4
.github/workflows/lint.yml
  • actions/checkout v4
  • pnpm/action-setup v2
  • actions/setup-node v4
npm
crates/panic/package.json
  • @napi-rs/cli ^3.0.0-alpha.47
  • @napi-rs/wasm-runtime ^0.2.4
  • emnapi ^1.2.0
  • npm-run-all2 ^6.2.2
package.json
  • @emnapi/core ^1.2.0
  • @emnapi/runtime ^1.2.0
  • @napi-rs/cli ^3.0.0-alpha.58
  • @napi-rs/wasm-runtime ^0.2.4
  • @swc-node/register ^1.10.7
  • @swc/core ^1.6.13
  • @taplo/cli ^0.7.0
  • @tybys/wasm-util ^0.9.0
  • @types/node ^20.14.10
  • ava ^6.1.3
  • benny ^3.7.1
  • chalk ^5.3.0
  • emnapi ^1.2.0
  • husky ^9.0.11
  • lint-staged ^15.2.7
  • npm-run-all2 ^6.2.2
  • oxlint ^0.7.0
  • prettier ^3.3.3
  • typescript ^5.5.3
  • node >= 10
  • pnpm 9.7.1

  • Check this box to trigger a request for Renovate to run again on this repository

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.