Skip to content

v0.3.0: Forth Source File Execution

Choose a tag to compare

@kirisaki kirisaki released this 03 Nov 17:12
· 19 commits to main since this release

What's New in v0.3.0

New Commands

v4 exec - Execute Forth Source Files

Execute Forth source files (.fs) directly on your device:

v4 exec examples/nanoc6/led.fs -p /dev/ttyACM0
  • Compiles Forth source using V4-front
  • Sends word definitions to device
  • Registers words in VM for later use

v4 exec --repl - Execute and Enter REPL

Execute a file and immediately drop into REPL with the compiler context preserved:

v4 exec examples/nanoc6/led.fs -p /dev/ttyACM0 --repl
# Now you can call led-on, led-off, led-blink, etc.

v4 repl --no-reset - Connect Without Reset

Connect to an already-running VM without resetting:

v4 repl -p /dev/ttyACM0 --no-reset

Useful for preserving existing word definitions on the device.

Example Library

Added examples/nanoc6/led.fs - LED control library for NanoC6 (ESP32-C6):

  • led-on - Turn LED on
  • led-off - Turn LED off
  • led-blink - Blink LED (500ms on/off)
  • led-blink-fast - Fast blink (100ms on/off)
  • led-blink-slow - Slow blink (1000ms on/off)

Installation

# Linux/macOS
curl -LO https://github.com/V4-project/v4_cli/releases/download/v0.3.0/v4-linux-x86_64
chmod +x v4-linux-x86_64
sudo mv v4-linux-x86_64 /usr/local/bin/v4

# Or use cargo
cargo install v4_cli

See CHANGELOG.md for full details.