|0.6.1||Mar 3, 2023|
|0.6.0||Mar 2, 2023|
#166 in Programming languages
86 downloads per month
Used in 3 crates (2 directly)
The Diatom Programming Language
A dynamic typed scripting language for embedded use in applications. This project is yet another attempt of being a "better" lua.
Warning: Project is still in experimental stage and API is considered as unstable.
- Never panic*
- High Performance**: Runs at most 2x speed of lua 5.4, 6x speed of python 3.10
- Support for a tracing jit (Planned)
- rustc style helpful error message
- No global variable
- Has real integer type
- Has 0-indexed real list type
- Support tuple for multiple return
- Support for string indexed table
- Support for meta table and OOP style method call syntax
- Support for gradual typing (Planned)
- Support for macro system (Planned)
*: Panic may still be triggered by external functions
**: Results are from our benchmarks which may vary betweens different builds and test codes.
Try Diatom online
You can try diatom at the online playground.
Install with cargo
Make sure you have Rust and Cargo installed.
cargo install diatom-cli diatom-cli --help # show help for diatom CLI diatom-cli # Enter diatom REPL console
Build from source
Run the following script:
git clone https://github.com/diatom-lang/diatom.git cd diatom cargo run --release # Run interactive console
- Vim/Neovim plugin: diatom.vim
Reference & Grammar
The Reference Book
The Diatom Reference (with examples) is available at here.
For standard library function and built-in types and methods checks examples. These examples are checked by unit tests.
Embedding in Application
Embedding in Rust Application
Diatom is available at crates.io with detailed examples.
To use latest build, add this repo to your
Cargo.toml. Latest build documentation is available here.
Use C bindings
Work in progress.
Functional style std-lib
Pretty error reporting and trace-back
Expression based syntax
Interactive REPL console with syntax highlight