https://github.com/orsinium-labs/bitsy-script
Rust interpreter for the scripting language used for dialogs in Bitsy game engine
https://github.com/orsinium-labs/bitsy-script
bitsy gamedev interpreter rust
Last synced: 5 months ago
JSON representation
Rust interpreter for the scripting language used for dialogs in Bitsy game engine
- Host: GitHub
- URL: https://github.com/orsinium-labs/bitsy-script
- Owner: orsinium-labs
- License: mit
- Created: 2025-12-18T09:49:23.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-12-24T14:41:39.000Z (6 months ago)
- Last Synced: 2025-12-25T06:25:52.683Z (6 months ago)
- Topics: bitsy, gamedev, interpreter, rust
- Language: Rust
- Homepage:
- Size: 70.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bitsy-interpreter
Rust interpreter for the scripting language used for dialogs in [Bitsy](https://bitsy.org/) game engine.
It's far from 100% compatibility. A lot of complex nodes won't be parsed. The goal was to keep the implementation simple and the AST flat. This might change in the future implementations and we'll hopefully have a proper parser for all quirks and gimmicks of bitsy.
## Installation
```bash
cargo add bitsy-script
```
## Usage
```rust
use bitsy_script::*;
let dialog = "hello {wvy}world{/wvy}!{br}";
let mut state = State::default();
let tokenizer = Tokenizer::new(dialog);
let interpreter = Interpreter {
tokens: tokenizer,
state: &mut state,
};
let words: Vec<_> = interpreter.collect();
```