Metadata-Version: 2.4
Name: yooxn
Version: 1.0.0
Summary: uxntal assembler in Python
Project-URL: Homepage, https://github.com/jjwatt/yooxn
Project-URL: Repository, https://github.com/jjwatt/yooxn
Project-URL: Issues, https://github.com/jjwatt/yooxn/issues
Author-email: Jesse Wattenbarger <jesse.j.wattenbarger@gmail.com>
License: GPL-3.0-only
License-File: LICENSE
Keywords: assembler,emulator,retrocomputing,uxn,uxntal
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Assemblers
Requires-Python: >=3.13
Description-Content-Type: text/markdown

# yooxn

Python tools for the **Uxn** ecosystem.

## yooxnas

`yooxnas` is a fast, multi-pass assembler for the `uxntal` language, written in pure Python.

[![CI](https://github.com/jjwatt/yooxn/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/jjwatt/yooxn/actions/workflows/ci-cd.yml)

### Features

- **Multi-pass architecture**: Ensures reliable label resolution and address calculation.
- **Macro support**: Full support for `uxntal` macros, including nested definitions.
- **Sub-label scoping**: Standard `@parent` and `&child` scoping rules.
- **Include system**: Assemble complex projects with multiple source files using `~include`.
- **Pure Python**: No external dependencies for the assembler itself.

### Installation

You can install `yooxn` via pip:

```bash
pip install yooxn
```

Or using [uv](https://github.com/astral-sh/uv):

```bash
uv add yooxn
```

### Usage

After installation, the `yooxnas` command will be available:

```bash
yooxnas file.tal
```

By default, it produces `output.rom`. You can specify the output path with `-o`:

```bash
yooxnas -o project.rom main.tal
```

You can also run it as a Python module:

```bash
python -m yooxn main.tal
```

Or directly with `uv run`:

```bash
uv run yooxnas file.tal
```

### CLI Options

```
usage: yooxnas [-h] [-o OUTPUT] [--debug] file

positional arguments:
  file                 tal file to assemble

options:
  -h, --help           show this help message and exit
  -o, --output OUTPUT  Output file to write
  --debug              Set loglevel to DEBUG
```

## Development

`yooxn` uses `uv` for dependency management and `hatchling` as the build backend.

To install in editable mode:

```bash
pip install -e .
```

To run tests:

```bash
pytest
```

Using `uv`:

```bash
uv run pytest
```
