Janet is a dynamic language and VM for scripting, automation, and embedding in C or C++ programs. A single binary or amalgamated C sources supply interpreter, compiler, and rich core library.
Overview
Janet combines functional and imperative styles in a small footprint suitable for system scripting and embedding. It is positioned like Lua or GNU Guile: easier to embed than Python, with more built-ins than Lua in the core. Programs run from a REPL, script files, or inside host applications via janet.c and janet.h.
The core ships hundreds of functions covering sockets, threading, subprocesses, filesystem access, macros, PEG-based parsing, green threads, OS threads, tables, tuples, buffers, and garbage collection. Developers can call C, load native plugins, and use a built-in C FFI. Supervision-tree patterns integrate with the per-thread event loop.
You can try Janet in a browser demo or install the janet binary on Windows, Linux, macOS, and BSD-family systems. Optional companions Spork and JPM add utilities and packaging. Embedding needs C99, math, and usually dynamic loading unless disabled at compile time.
Documentation is available online, in the REPL via doc forms, and through community forums and editor plugins for common editors.
Key features
- Bytecode interpreter and compiler
- REPL with debugger support
- Single-file C embedding (janet.c)
- Sockets, threads, and subprocesses
- PEG parsing in the core
- Macros and tail-call optimization
- Mutable and immutable collections
- Dynamic native module loading
Use cases
- Embedding scripting in C/C++ apps
- System and automation scripting
- Rapid prototyping with small runtime
- Networked tools with built-in I/O
- Teaching Lisp-style programming