Last updated

A JavaScript runtime based on JavaScriptCore and Nim. No drama, no overhype. With a rich standard library, so you do not need npm anymore. It ships with an efficient package manager that abolishes node_modules and keeps dependencies in one shared global store instead.

This is not a drop-in replacement for Node.js, Bun or Deno. It is a runtime with an opinion: most scripts should not need a dependency at all. It trades the npm ocean for a standard library that covers everyday work out of the box, starts in ~8 ms on the back of JavaScriptCore, and stays ~6k lines of Nim, small enough to read in an afternoon. If you want the Node ecosystem, keep Node. If you want a script that just runs, take Carne.

🔗Key features

  • JavaScript runtime powered by JavaScriptCore
  • Powerful standard library fully written in Nim
  • Cryptographic library via pkg/nimcypher
  • HTTP/1.1, HTTP/2, UDP, TCP and WebSockets via pkg/powpow
  • Built-in formatters: yaml, toml, csv, xml, markdown, vcard, feed, sql, colors, css, diff, qr, svg
  • i18n via GNU Gettext PO/MO
  • CSS and JavaScript bundler via pkg/squeezy
  • Built-in package manager (carne pkg)
  • Written in Nim, MIT License

🔗Quick start

// hello.jsconsole.log("hello from carne");
carne run hello.js

🔗Standard library

All modules load lazily via the global require("std/<name>"); requiring one costs nothing until first use. Timers are globals (no require needed).

See the Libraries section for per-module documentation.

🔗Package manager

Carne ships a DFS package manager with one shared global store (~/.carne, no node_modules). See the Package manager page.

🔗Status

🔗❤ Contributions & Support

🔗License

MIT license. Made by Humans from OpenPeeps.