garage44.eu/jeroen/frits

logclone: git clone https://garage44.eu/jeroen/frits.git

.. /README.md

raw

Frits

Frits is the scripting language of Pinnacle, meant to run in the Cartopolis simulator as well. It replaces TypeScript/Bun for apps, scripts, the shell and prim scripts.

Written in Rust with no outside crates, like Pinnacle itself.

script / Prim, Chat, Timer

enum State { Patrol, Summoned }
var state = Patrol

on timer() {
    match state {
        Patrol => Prim.set_geo({ lat: 53.2194, lng: 6.5665 }),
        Summoned => Chat.say("Coming, {Timer.now():.1} s in."),
    }
}

docs/design.md describes the language, the runtime and how they measure against Luau and Bun.

cargo test --workspace                       # the language's tests and the ported Cartopolis scripts
cargo run --release -p frits-bench           # the benchmark against the simulator scenarios
cargo run -p frits -- run hello.frits        # a script on the console platform (`on main()`)
cargo run -p frits -- test hello.frits       # its `test` blocks
cargo run -p frits -- fmt hello.frits        # format it

Licence

MIT OR Apache-2.0, at your option (LICENSE).