Gathering detailed insights and metrics for @webassemblyjs/wasm-edit
Gathering detailed insights and metrics for @webassemblyjs/wasm-edit
Gathering detailed insights and metrics for @webassemblyjs/wasm-edit
Gathering detailed insights and metrics for @webassemblyjs/wasm-edit
npm install @webassemblyjs/wasm-edit
Typescript
Module System
Node Version
NPM Version
JavaScript (99.38%)
Makefile (0.21%)
WebAssembly (0.2%)
Shell (0.16%)
C (0.04%)
CSS (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
815 Stars
2,152 Commits
94 Forks
10 Watchers
22 Branches
36 Contributors
Updated on Jul 10, 2025
Latest Version
1.14.1
Package Id
@webassemblyjs/wasm-edit@1.14.1
Unpacked Size
33.82 kB
Size
6.48 kB
File Count
7
NPM Version
lerna/5.1.6/node@v21.7.1+x64 (linux)
Node Version
21.7.1
Published on
Nov 06, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Rewrite a WASM binary
Replace in-place an AST node in the binary.
1yarn add @webassemblyjs/wasm-edit
Update:
1import { edit } from "@webassemblyjs/wasm-edit"; 2 3const binary = [/*...*/]; 4 5const visitors = { 6 ModuleImport({ node }) { 7 node.module = "foo"; 8 node.name = "bar"; 9 } 10}; 11 12const newBinary = edit(binary, visitors);
Replace:
1import { edit } from "@webassemblyjs/wasm-edit"; 2 3const binary = [/*...*/]; 4 5const visitors = { 6 Instr(path) { 7 const newNode = t.callInstruction(t.indexLiteral(0)); 8 path.replaceWith(newNode); 9 } 10}; 11 12const newBinary = edit(binary, visitors);
Remove:
1import { edit } from "@webassemblyjs/wasm-edit"; 2 3const binary = [/*...*/]; 4 5const visitors = { 6 ModuleExport({ node }) { 7 path.remove() 8 } 9}; 10 11const newBinary = edit(binary, visitors);
Insert:
1import { add } from "@webassemblyjs/wasm-edit"; 2 3const binary = [/*...*/]; 4 5const newBinary = add(actualBinary, [ 6 t.moduleImport("env", "mem", t.memory(t.limit(1))) 7]);
Providing an AST allows you to handle the decoding yourself, here is the API:
1addWithAST(Program, ArrayBuffer, Array<Node>): ArrayBuffer; 2editWithAST(Program, ArrayBuffer, visitors): ArrayBuffer;
Note that the AST will be updated in-place.
No vulnerabilities found.
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 5/20 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
binaries present in source code
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
71 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More