#scripting-language #anachro #forth #powerbus #bytecode-compiled #forth-inspired #no-std

no-std anachro-forth-core

A forth-inspired, bytecode-compiled scripting language for Anachro Powerbus

2 releases

0.0.2 Nov 24, 2021
0.0.1 Nov 24, 2021

#726 in Embedded development

29 downloads per month

MIT/Apache

55KB
1.5K SLoC

Anachro Forth (core)

Anachro Forth is a forth-inspired, bytecode-compiled scripting language for Anachro Powerbus platform.

Use Case

The intended use case is to write and compile scripts on a Host PC, and to load and execute these scripts in a constrained, no_std environment, such as on embedded systems or WASM targets.

Contents

This crate contains the core components of the language, including:

  • The compiler - which converts text-based source code into a bytecode representation. The compiler is only compatible with "std" platforms
  • The runtime - which executes the compiled bytecode. Additionally, the runtime has two implementations:
    • The "std" runtime, which uses heap allocations for convenience
    • The "no_std" runtime, which is suitable for constrained environments, and does not require heap allocations
  • The Builtins - Which are functions available to be used from the scripts, but are implemented in Rust
  • The Wire Format - which is used to serialize and deserialize the compiled bytecode, allowing it to be sent or stored for execution on another device

Stability

This project is in early, active, development. Frequent breaking changes are expected in the near future. Please contact me if you would like to use Anachro Forth for your project or product

License

Licensed under either of

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.

Dependencies

~1.2–1.9MB
~40K SLoC