| Crates.io | uxn-tal |
| lib.rs | uxn-tal |
| version | 0.7.4 |
| created_at | 2025-08-02 03:21:20.565328+00 |
| updated_at | 2025-11-05 03:57:40.667413+00 |
| description | uxntal:// protocol | a Rust library for assembling TAL (Tal Assembly Language) files into UXN ROM files |
| homepage | |
| repository | https://github.com/davehorner/cardinal/tree/main/uxn-tal |
| max_upload_size | |
| id | 1778127 |
| size | 1,181,736 |
uxntal a url protocol handler uxntal:// which allows users to quickly run tal, rom, and orca files via URL. It is also comprehensive Rust library for assembling TAL (Tal Assembly Language) files into UXN ROM files.
This library provides functionality to parse TAL source code and generate bytecode compatible with the UXN virtual machine, with full symbol generation support for debugging. Unlike drif assemblers it includes line:col information in the error messages so you can ctrl+click to your source.
It was written by reading the source for uxn/uxnasm.c; building a comparison framework to compare the output of assemblers, and lots of comparison and LLM queries. The tools are verbose by default and not yet optimized for speed or non-development purposes. It is a goal to be able to assemble the drif assemblers and produce identical output as the drif assemblers. If you find something doesn't work or match up, please submit an issue.
uxn-tal and uxntal are names for the technology and a poor name for a specific project. Given the name is published, I am going to continue with the uxl-tal and uxntal names. The spirit of the cardinal project is a personal computing stack; and uxn-tal/uxntal crate will hopefully be used to faciliate wider usage of different assemblers, emulators, pre-processors, extensions in the UXN ecosystem.
The assembler will be referred to as cuxn in the future (Cardinal UXN). I haven't yet broken out a cuxnasm or made any moves to rename things.
Today the primary binary is:
Usage:
uxntal [flags] <input.tal|/dev/stdin> [output.rom]
Flags:
--version, -V Show version and exit
--verbose, -v Verbose output
--rust-interface[=M] Emit Rust symbols module (default module name: symbols)
--cmp Compare disassembly for all backends
--stdin Read input.tal from stdin
--cmp-pp Compare preprocessor output (Rust vs deluge)
--pre Enable preprocessing
--preprocess Print preprocessed output and exit
--drif, --drifblim Enable drifblim-compatible mode (optimizations, reference resolution)
--debug Enable debug output
--r, --root[=DIR] Set root directory for includes (default: current dir)
--register Register uxntal as a file handler (Windows only)
--unregister Unregister uxntal as a file handler (Windows only)
--help, -h Show this help
Behavior:
If output.rom omitted, use input path with .rom extension, or 'out.rom' if reading from stdin.
You can also pass /dev/stdin as the input filename to read from stdin.
Rust interface file path: <output>.rom.symbols.rs
A few unique arguments to call out specifically are the --rust-interface, --cmp, and the --register arguments.
--rust-interface generates a rust file that contains all of the labels, sizes, and offsets so that you can access that data via rust interface. This means you can run a rom and access ram data via label.
--cmp will attempt to build your tal file against a number of different asm backends. It will use the asm backend on the host machine if it is in the path. Otherwise, if you are running a docker daemon, it will create docker images and generate roms via docker.
--register will setup a protocol handler for uxntal:// on your system. It will also ask you to install the e_window and cardinal-gui crates as a dependency. This feature allows you to place uxntal:// in front of any http(s) url and uxntal will download, assemble, cache, and run the tal/rom file pointed to by url.
cargo install uxn-tal
uxntal --register
uxntal uxntal://https://wiki.xxiivv.com/etc/catclock.tal.txt
The above will run a catclock on Windows, MacOS, and Linux. You can prepend the uxntal:// to any valid tal url, or you can create a bookmarklet on your bookmark toolbar to launch the protocol on click of a bookmarklet. See uxn-tal-defined for more details.
2), return mode (r), and keep mode (k)uxncli, uxnemu, and other UXN emulators#12, #1234), character ('A'), decimal, and binary@main) and sublabels (&loop);main), relative (,loop), and sublabel references|0100) and byte skipping ($10)( like this )Single File Assembly: Simple one-function assembly with symbol generation
Batch Processing: Process entire directories of TAL files
Flexible Options: With or without symbol file generation
Comprehensive Error Handling: Detailed error messages with line numbers
uxncli - Command-line UXN emulatoruxnemu - UXN emulator with GUICompatible with all standard UXN emulators
Proper memory layout and addressing
Correctly trimmed ROM files (excludes zero page padding)
This project is licensed under the MIT License - see the LICENSE file for details.
The repository includes ROMs and TAL files from the uxn reference
implementation, which are © Devine Lu Linvega and released under the MIT
license
Contributions are welcome! Please feel free to submit a Pull Request.
#b10101010'A, 'B"Hello World"