Crates.io | hebi |
lib.rs | hebi |
version | 0.4.0 |
source | src |
created_at | 2023-02-24 16:54:00.463789 |
updated_at | 2023-07-02 16:35:29.900243 |
description | A dynamic scripting language |
homepage | |
repository | https://github.com/jprochazk/hebi |
max_upload_size | |
id | 793765 |
size | 971,607 |
This repository hosts a dynamically typed language, its compiler, and VM.
🚧 This branch contains a rewrite of the language. It is currently heavily WIP! 🚧
Install the library (currently only available via git):
$ cargo add --git https://github.com/jprochazk/hebi.git --branch v2
Import it, and run some code:
use hebi::Hebi;
fn main() {
let mut hebi = Hebi::new();
println!("1 + 1 = {}", hebi.eval("1 + 1").unwrap());
}
Hebi can do much more than this, though! Here are some of its features:
Visit the examples directory to see Hebi in action.
You can run an example using cargo run --example <name>
:
$ cargo run --example basic
The first step is to install Rust and Cargo via rustup.
This repository uses cargo-xtask for various utilities, scripts, and tasks. That means you don't need anything other than Rust and Cargo. No makefiles, Python, or Bash.
To see all available tasks, run:
$ cargo xtask
To run one of them, use:
$ cargo xtask <task>
Or the slightly shorter:
$ cargo x <task>
For example:
# Run all tests and examples
$ cargo xtask test
Some tasks use tools which you'll have to install, though these are kept to just a select few, and ideally always installed through either rustup
or cargo
.
rustup +nightly component add miri
)cargo install --locked cargo-insta
)cargo install --locked mdbook
)I thought it was appropriate, because the language is in the Python family, and Hebi (蛇) means snake in Japanese.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.