Expand description
libdeno — embed the Deno runtime in Rust with direct npm support.
Runs a JS/TS entry file (or a local package.json project) on the official
deno module graph pipeline: npm: specifiers, remote modules, deno.json
import maps, jsr:, CJS packages, wasm, .node native addons, web workers
and child_process.fork are all handled by the graph loader.
use libdeno::{LibdenoOptions, run};
let options = LibdenoOptions {
permissions: vec!["--allow-read=.".into(), "--allow-net=example.com".into()],
args: vec![],
cwd: None,
};
let exit_code = run("app.js", &options).unwrap();Structs§
- Libdeno
Options - Options for a single
runinvocation.
Enums§
- Libdeno
Error - Errors from a
runinvocation.
Statics§
Functions§
- maybe_
handle_ child_ mode - Services a child-run request when this process was spawned by
run_in_subprocess. - run
- Runs
entry(a file, a directory, or a package.json) to completion and returns the exit code the script requested (0 on normal completion). - run_
in_ subprocess - Runs
entryin a child process and returns its exit code.