rtforth

Crates.iortforth
lib.rsrtforth
version0.6.8
sourcesrc
created_at2017-01-21 11:34:33.871702
updated_at2022-09-23 02:45:48.228218
descriptionForth implemented in Rust for realtime application
homepage
repositoryhttps://github.com/chengchangwu/rtforth.git
max_upload_size
id8156
size825,644
Core (github:taskcluster:core)

documentation

README

rtForth

Forth implemented in Rust, designed to be embeddable in real-time applications.

Documentation in traditional Chinese at rtForth 入門.

Design decisions:

  • Safe first, performance later
  • Call threading

Usage of the example program rtf

cargo install --path ./rtf
rtf --help         # Display help information.
rtf <file>         # Load forth commands in <file>.
rtf lib.fth <file>  # Load lib.fth before <file>.
$ rtf              # Execute debug version of rtForth.
rtForth v0.6.6, Copyright (C) 2022 Mapacode Inc.
Type 'bye' or press Ctrl-D to exit.
: star 
   42 emit ;  ok
: stars 
   0 ?do star loop ;  ok
5 stars ***** ok
bye

Use as a Rust crate

rtForth is designed to be used in a real-time system. After startup most of the words other than input and output words do not use system calls.

Input and output words can be implemented by applications according to the operating system used.

See examples/simple.rs and examples/multitask.rs to get know how to embedded rtforth in a rust application.

Commit count: 1163

cargo fmt