
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
emscripten-wasm-loader
Advanced tools
Common interface to load wasm module into isomorphic environment
Wraps up common initialization logic with predefined preprocessor object. This module intended to support specific scoped usecase for wasm binary built with MODULARIZED
and SINGLE_FILE
.
import { getModuleLoader } from 'emscripten-wasm-loader';
const loader = getModuleLoader(factoryLoader, require('wasm/wasmlibaray'), { additional: ''});
getModuleLoader
is higher order function returns actual module loader.
getModuleLoader<T, R extends AsmRuntimeType>(
factoryLoader: (runtime: R) => T,
runtimeModule: runtimeModuleType,
module?: Record<string, any>
) => moduleLoaderType<T>;
/**
* Asynchronously load and initialize asm module.
*
* @returns {T} Factory function manages lifecycle of hunspell and virtual files.
*/
type moduleLoaderType<T> = () => Promise<T>;
factoryLoader
is callback function to be called to create actual instance of module using initialized wasm binary runtime for customized init steps for each consumer. runtimeModule
is function loaded via require
to emscripten preamble js for wasm binaries. It expects wasm binary should be built with MODULARIZE=1
with SINGLE_FILE=1
option. Lastly module
is object to be inherited when execute runtimeModule
. Emscripten's modularized preamble construct scoped wasm runtime module named Module
, allows to have predefined object if needed. Internally getModuleLoader
augments given object and set default interfaces like initializeRuntime
.
FAQs
Common interface to load wasm module into isomorphic environment
The npm package emscripten-wasm-loader receives a total of 7,962 weekly downloads. As such, emscripten-wasm-loader popularity was classified as popular.
We found that emscripten-wasm-loader 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.