[−][src]Crate janetrs
Janetrs
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.
Notice that most doc tests will fail if the feature "almagation" or "link-system" aren't set, because most of then need it for the Janet runtime to function properly.
Cargo Features
std
: Enable some trait impl for types that only exist on thestd
and the Error traitunicode
: Enable more methods for JanetString and JanetBufferinline-more
: More agressive inliningamalgation
: Link the Janet runtime to the package, enabling to use the client modulesystem
: Use system header to get Janet functionslink-system
: Link the Janet runtime to the package from the system, enabling to use the client module
Licensing
This software is licensed under the terms of the MIT Public License.
TODO: Types: Lacking or Incomplete
- [ ] JanetAbstract
- [I] JanetCFunction
- [I] JanetFiber
- [I] JanetFunction
- [ ] JanetPointer
- [ ] Janet Typed Array
- [ ] GC functions
[ ]: 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.
- We still don't know exactly how Janet panics would work on Rust, so we need to explore that and documment it
Re-exports
pub use evil_janet as lowlevel; |
Modules
client | This module implements anything required to run a Janet client. |
types | This module should have all Janet type structures. |
util | Module for stuff that are not required either to use in a application or to write janet modules. |
Macros
array | Creates a |
janet_mod | A macro to make life easier creating modules for Janet from Rust. |
jpanic | Causes a panic in the Janet side. Diferently of the Rust |
jtry | Macro that tries to run a expression, and if it panics in Rust side, it tries to recover from that and pass the Rust panic string to a Janet Panic. |
structs | Creates a |
table | Creates a |
tuple | Creates a |