Ratón 🐁
A tiny, highly modular, embeddable, dynamically typed scripting language with a bytecode VM, intended for use in games.
Example
[]
= {
version = "0",
= ["i32_type", "while_loop", "single_line_comment"],
= false
}
// Add up all integers from 1 to n
Status
Unfinished, do not use in production.
Components
- Parser
- Bytecode generator
- Bytecode linker
- Bytecode VM
- Optimizer
- Modular standard library
Modular type system
-
null -
bool(optionalbool_typefeature) -
i32(optionali32_typefeature) -
f32(optionalf32_typefeature) -
string(optionalstring_typefeature) - Host value (optional)
- Host reference (optional)
Modular language features
-
if,else(optionalif_expressionfeature) -
while,break,continue(optionalwhile_loopfeature) -
//comments (optionalsingle_line_commentfeature) -
/* */comments (optionalmulti_line_commentfeature)
Serialization
-
serde(ast and bytecode) -
bitcode(bytecode only)
Other features
- Portable to any platform, 32 bits or higher, supported by Rust
- Fuzzing (
cargo fuzz run fuzz -- -timeout=5) -
#![forbid(unsafe_code)], also validated in Miri -
no_std - Denial of service prevention
- Proper error handling
- Proper error messages
- Lexical scope
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
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.