node-js 0.1.0

JavaScript as a fusevm frontend: a lexer/parser and compiler to fusevm::Chunk on a JsHost object heap, with no bespoke VM or JIT
Documentation
[package]
name = "node-js"
version = "0.1.0"
edition = "2021"
rust-version = "1.80"
description = "JavaScript as a fusevm frontend: a lexer/parser and compiler to fusevm::Chunk on a JsHost object heap, with no bespoke VM or JIT"
license = "MIT"
publish = true

# node-js is a standalone crate, not a workspace member. An explicit empty
# `[workspace]` stops cargo walking up to the MenkeTechnologiesMeta parent.
[workspace]

[lib]
name = "nodejs"
path = "src/lib.rs"
# staticlib so an AOT object can be linked against the nodejs runtime into a
# standalone native executable (mirrors pythonrs).
crate-type = ["rlib", "staticlib"]

[[bin]]
name = "node"
path = "src/main.rs"

# Differential parity harness: runs the corpus through node-js and the reference
# `node`, diffing stdout. Development tool — needs `node` on PATH, so CI never
# runs it; its frozen outputs live in tests/data/parity_expected.txt, which
# tests/parity.rs replays with no `node` installed.
# Offline reference-manual generator: consumes the `nodejs::lsp` corpus and
# writes docs/reference.html (article-format keyword/global/method reference).
# The MenkeTechnologiesPublications reference PDF pipeline runs this.
[[bin]]
name = "gen-docs"
path = "src/bin/gen_docs.rs"

[[bin]]
name = "parity"
path = "src/bin/parity.rs"

# Differential parity FUZZER: generates thousands of deterministic-output JS
# snippets (biased toward float repr / exponential-notation threshold, ToInt32
# bitwise wrap, the `==` coercion matrix, `+` coercion, string/array methods,
# toFixed/toPrecision rounding, JSON round-trips) and diffs `node -e` against the
# reference `node -e`, delta-debugging every divergence to a minimal repro.
# Subprocess-only (never links the lib); std-only (no `rand`). Dev tool — needs
# `node` on PATH, so CI never runs it.
[[bin]]
name = "parity-fuzz"
path = "src/bin/parity_fuzz.rs"

[dependencies]
# JavaScript executes on fusevm. node-js is a pure frontend: it lowers JS to
# fusevm bytecode (src/compiler.rs) and hosts the JS object heap (src/host.rs,
# reached from fusevm's builtin dispatch + numeric hook). Object/str/array cells
# ride through the VM as `Value::Obj(u32)` handles into that heap.
#
# `jit-disk-cache` turns on fusevm's Cranelift JIT *and* its persistent on-disk
# cache of compiled native code; `aot` enables the ahead-of-time object emitter.
fusevm = { version = "0.14.10", features = ["jit", "jit-disk-cache", "aot"] }

clap = { version = "4.5", features = ["derive", "cargo"] }
thiserror = "2.0"
rustc-hash = "2.1"
# JS objects preserve property insertion order (observable in iteration / repr).
indexmap = "2"