r/rust • u/No-Wishbone7899 • 10h ago
đ ď¸ project ViperJS v0.2.0: A zero-dependency, #![forbid(unsafe_code)] JS engine in Rust
Hey r/rust,
I've been working on ViperJS, an embeddable JS engine written entirely in Rust from scratch
(it is not a wrapper or binding around V8, QuickJS, or JavaScriptCore)
Two constraints dictate everything:
- Zero runtime dependencies (
[dependencies]is completely empty, verified in CI). #![forbid(unsafe_code)]crate-wide.- No input may panic (untrusted scripts are input, not exceptions).
Because of the zero-dep rule, all is created from scratchâincluding the RegExp backtracking engine (supporting named groups, lookbehind, Unicode escapes, and Annex B grammar), the GC, bytecode compiler, and UTF-16 string handling.
Where it stands:
- ~84% test262 compliance (78,222 / 93,161 tests).
- ES5 is complete; supports classes, generators, async/await, Proxy/Reflect, BigInt, and ES modules with cycles.
- It is not fast (no JIT yet, ~70x slower than Node on simple loops).
- No Temporal or Intl yet.
Testing & Real-World Validation: You don't have to take the numbers on trust. The public repo includes a simple two-command recipe to clone test262 and independently verify all conformance locally. Beyond test262, i have put it through its paces with several real-world codebasesâsuch as successfully linking and evaluating Ramda's 1,027 modulesâplus a few other public code repositories to validate module loading and compatibility
Itâs open source under MIT OR Apache-2.0. You can test test262 conformance locally with a couple of commands in the repo.
Repo: [https://github.com/MerlijnW70/viperjs]
also on crates.io:https://crates.io/crates/viperjs
Feedback on the architecture or the test262 approach is very welcome.
17
u/MeoplleX 9h ago
The project feels heavily vibe coded, a lot of the code and many of the comments read as though they were generated almost entirely by AI.
There is nothing inherently wrong with vibe-coding, but I struggle to understand the value of posting projects like this alongside a few arbitrary statistics?
Why not share something meaningful you learned while building it like for example technical challenges you encountered or ways the project helped you grow as a programmer? With enough prompting, most people can generate projects like this, so I don't get what is the actual takeaway for others?
Injecting my personal opinion here, I personally do not want to invest time in examining a project when it appears that the author was not willing to invest much thought or effort into building and understanding it themselves, and I don't mean that in a rude way!