#janet #embedding #ffi

sys no-std evil-janet

Low level bindings to the janet language c api

30 stable releases

1.26.0 Jan 29, 2023
1.25.1 Nov 12, 2022
1.24.1 Sep 4, 2022
1.23.0 Jun 21, 2022
1.11.0 Jul 19, 2020

#87 in No standard library

Download history 7/week @ 2022-11-28 14/week @ 2022-12-05 17/week @ 2022-12-12 57/week @ 2022-12-19 18/week @ 2022-12-26 10/week @ 2023-01-02 18/week @ 2023-01-09 14/week @ 2023-01-16 30/week @ 2023-01-23 47/week @ 2023-01-30 44/week @ 2023-02-06 71/week @ 2023-02-13 153/week @ 2023-02-20 5/week @ 2023-02-27 14/week @ 2023-03-06 7/week @ 2023-03-13

185 downloads per month
Used in 3 crates (2 directly)

Custom license

2.5MB
45K SLoC

C 42K SLoC // 0.0% comments Rust 3.5K SLoC // 0.0% comments

evil-janet

This is a rust crate providing low level bindings to the janet C API.

Versioning scheme

The package major and minor versions follow the janet releases the bundled headers are compatible with. The patch version may, but does not necessarily match the janet release.

Feature flags

  • link-amalg: The crate will link the compiled Janet amalgamation
  • link-system: Link to the libjanet library from the system (not recommended generally)
  • system: Use Janet header from the system
  • debug-symbols: Compile with max debug symbols

if the feature link-amalg is enabled, the crate will link the compiled janet amalgamation, otherwise this crate is header only, which is useful for building standalone janet modules.

Environment variables

These variables are only used when using the feature link-amalg

This crate uses environment variables to overwrite some Janet definitions.

  • JANET_RECURSION_GUARD=<integer>
  • JANET_MAX_PROTO_DEPTH=<integer>
  • JANET_MAX_MACRO_EXPAND=<integer>
  • JANET_STACK_MAX=<integer>

Safety

This crate makes no attempt memory safety. It is the bare minimum required to use the Janet API from Rust. For a higher level crate you can look for JanetRS.

Dependencies

~0–1.6MB
~35K SLoC