
Research
/Security News
Coruna Respawned: Compromised art-template npm Package Leads to iOS Browser Exploit Kit
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.
inline-wasm
Advanced tools
A tool for bundling a WebAssembly .wasm file into a .js library file with async loading.
A tool for bundling a WebAssembly .wasm file into a .js ES6 library file with async loading.
npm install -D js-inline-wasm
$ inlinewasm sample.wasm [--output sample.js] [--type fetch]
In package.json
scripts: {
"inlinewasm": "inlinewasm wasm/sample.wasm --output build/sample.js"
}
--input file The .wasm file to inline
-o, --output file The .js file to create
-t, --type typeName The type of JavaScript file to generate
-h, --help Show this Help page
Each type outputs a different variant of JavaScript file
Creates a JavaScript file with a default export function that can be used anywhere you could use fetch(). e.g.
import fetchSample from 'sample'; // sample.js contains the bundled .wasm
WebAssembly.instantiateStreaming(fetchSample)
.then(obj => obj.instance.exports.exported_func());
Creates a JavaScript file with a default export byte array containing the decoded .wasm content
Note: You'll probably want to use WebAssembly.instantiateStreaming() in most cases, as it is more efficient than instantiate().
import decodedSample from 'sample'; // sample.js contains the bundled .wasm
WebAssembly.instantiate(decodedSample)
.then(obj => obj.instance.exports.exported_func());
Creates a JavaScript file with a default export string value containing the base64 encoded .wasm file
import encodedSample from 'sample'; // sample.js contains the bundled .wasm
// Decode the base64 string then compile...
FAQs
A tool for bundling a WebAssembly .wasm file into a .js library file with async loading.
The npm package inline-wasm receives a total of 0 weekly downloads. As such, inline-wasm popularity was classified as not popular.
We found that inline-wasm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.

Company News
As AI accelerates how code is written and shipped, Socket is scaling to protect the software supply chain from the growing wave of attacks targeting open source dependencies.

Company News
Socket is scaling to defend open source against supply chain attacks as AI accelerates software development.