
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
This package aims to provide a way to:
npm
$: npm install -g wasmoon
This will install wasmoon
globally so that it may be run from the command line anywhere.
Using npx
you can run the script without installing it first:
$: npx wasmoon
Wasmoon by default reads and execute code from stdin, but you can force it to read from file passing the -f
argument:
$: wasmoon -f file.lua
To initialize wasmoon on your project:
const { Lua } = require('wasmoon')
await Lua.ensureInitialization()
Create a new Lua state, register the standard library, set a global variable, execute a code and get a global variable:
const state = new Lua();
try {
state.registerStandardLib();
state.setGlobal('sum', (x, y) => x + y);
state.doString(`
print(sum(10, 10))
function multiply(x, y)
return x * y
end
`);
const multiply = state.getGlobal('multiply');
console.log(multiply(10, 10))
} finally {
state.close();
}
FAQs
A real lua VM with JS bindings made with webassembly
The npm package wasmoon receives a total of 469 weekly downloads. As such, wasmoon popularity was classified as not popular.
We found that wasmoon 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.