GrayJack
janetrs
Rust

Rust high level bindings for Janet

Last updated May 28, 2026
97
Stars
8
Forks
4
Issues
0
Stars/day
Attention Score
33
Language breakdown
Rust 100.0%
โ–ธ Files click to expand
README

JanetRS

Hits-of-Code Build Status Crates.io Docs latest release Docs dev branch MIT license

A crate with high level bindings to Janet C API.

Goals

Provide a safe and ergonomic interface to the Janet C API to create Janet clients and Janet modules/libraries using Rust.

This project still are in it's early stages, so breaking changes may happen, there is no minimal supported Rust version (MSRV) yet.

Cargo Features

  • std: Enable some trait impl for types that only exist on the std and the
Error trait
  • unicode: Enable more methods for JanetString and JanetBuffer
  • inline-more: More aggressive inlining
  • amalgation: Link the Janet runtime to the package, enabling to use the
client module
  • unicode: Enable some unicode methods for JanetString and JanetBuffer
  • system: Use system header to get Janet functions
  • link-system: Link the Janet runtime to the package from the system, enabling
to use the client module
  • nightly: Enable some parts of the crate that uses nightly features, to use
this feature you must compile the crate using a nightly rust version

By default, the following features are enabled: std, unicode, amalgation.

Note: If you don't need the Janet runtime (eg. making a Janet Library), you can use disable the default features

janetrs = { version = "0.7.0", default-features = false, features = ["std", "unicode"] }

Environment variables

These variables are only used when the amalgation feature is enabled

It is possible to use environment variables to overwrite some Janet definitions.

  • JANETRECURSIONGUARD=<integer>
  • JANETMAXPROTO_DEPTH=<integer>
  • JANETMAXMACRO_EXPAND=<integer>
  • JANETSTACKMAX=<integer>

Licensing

This software is licensed under the terms of the MIT Public License.

TODO: Types: Lacking or Incomplete

  • [ ] Marshaling
[ ]: Lacking [I]: Incomplete [X]: Done

Probably there is much more missing, for that you can use the lowlevel module to access the raw C API of Janet

TODO: Lib level

  • Better docs.
  • Marshalling mechanism

Acknowledgments

called Janet discuss with us some ideas for the abstractions of this crate
๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท GrayJack/janetrs ยท Updated daily from GitHub