Pyliu
Pyliu is a lightweight Python assembly experimentation framework for building, compiling, and executing simple assembly-like programs. It combines a small CPU instruction DSL, a compiler layer, and multiple runtime backends so you can explore low-level execution patterns from Python.
Features
- A simple CPU instruction abstraction layer
- A compiler pipeline for assembling programs into machine code
- An in-process JIT-style runtime
- A bare-metal QEMU runtime for isolated execution
- An optional CLI for installing QEMU explicitly
Installation
Install from the project directory:
pip install -e .
Or, if you are using the local virtual environment:
.venv\Scripts\python.exe -m pip install -e .
Optional QEMU dependency
QEMU is treated as an optional dependency for Pyliu.
By default, Pyliu does not try to download or install anything automatically. If you want to use the QEMU-backed runtime, install it explicitly:
python -m Pyliu install-qemu
Or, if you are using the project virtual environment:
.venv\Scripts\python.exe -m Pyliu install-qemu
Quick start
from Pyliu.verification import Program
program = Program()
program.begin()
program.mov("eax", "1")
program.ret()
program.end()
print(program.compile())
Using the QEMU runtime
from Pyliu.verification import Program, QEMURuntime
program = Program()
program.begin()
program.mov("eax", "1")
program.ret()
program.end()
runtime = QEMURuntime(timeout=5)
print(runtime.run(program))
CLI
Pyliu exposes a small CLI for optional QEMU installation:
python -m Pyliu --help
python -m Pyliu install-qemu
Project structure
Pyliu/
├── __init__.py
├── __main__.py
├── verification.py
└── tests/
└── test_qemu_optional.py
Notes
- The QEMU runtime is intended for experimentation and research-oriented workflows.
- The package is designed to remain safe and non-invasive for PyPI-style packaging by avoiding automatic system modifications during import or normal runtime use.
License
This project is provided as-is for educational and research use.
Metadata
Release files for pyliu 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyliu-0.1.0.tar.gz | 12.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyliu-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.6 kB
Release files / pyliu-0.1.0.tar.gz
| Download URL | pyliu-0.1.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43432baaf6acf57467c00977c1336008ddee1f70c68674209b3bd8326d1f5633
|
|
BLAKE2b-256 checksum How to use checksums |
7b90d0926da8d067c124b39eb5f38ffa3e296ad1bac215247924159c1a65f27f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / pyliu-0.1.0-py3-none-any.whl
| Download URL | pyliu-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5fb571aee879e7eb8d5eb22365b0ed386024d8d586330d1a880fd85a312208fa
|
|
BLAKE2b-256 checksum How to use checksums |
5b70f8083b230f5166fa9b17e689a459ade12b24292dc5fd1adedb7d14ce1925
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for pyliu 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.