Overview
The basictalon command runs a Wren script file using the Talon runtime environment with Raylib bindings. This is the primary way to execute your Talon game or application.
Syntax
Path to the Wren script file to execute. Can be a relative or absolute path.
Behavior
When you run a Talon script:- File Loading: The runtime opens and reads the specified
.wrenfile - VM Initialization: Creates a Wren virtual machine with Raylib bindings configured
- Module Resolution: Automatically resolves and loads imported modules (like
raylib) - Script Execution: Interprets and executes the Wren code
- Error Reporting: Reports compilation or runtime errors to the console
Exit Codes
The command returns different exit codes based on execution result:- Success: Script executed without errors
- Compile Error: Syntax or compilation errors in the Wren code
- Runtime Error: Errors during script execution
- File Error: Unable to open or read the specified file
Examples
Basic Usage
Run a simple Wren script:Running Examples
Execute one of the example games:Typical Output
Common Use Cases
Development Workflow
During development, you’ll frequently run your main script:--hot flag instead.
Testing Scripts
Quickly test a standalone Wren file:Running Different Entry Points
Switch between different entry points for your game:File Requirements
The specified file must:- Have a
.wrenextension - Exist in the file system
- Contain valid Wren syntax
- Be readable by the current user
Module Imports
Your script can import Talon’s built-in modules:Related Commands
talon --hot- Run with automatic reloading on file changestalon init-exe- Generate build configuration for executablestalon init-wasm- Generate build configuration for WebAssembly
Troubleshooting
”We require a wren script to run”
You didn’t specify a file to run. Provide a.wren file as an argument:
“Failed to open file”
The specified file doesn’t exist or isn’t readable. Check:- The file path is correct
- The file exists in the specified location
- You have read permissions