Delus
A set of super lightweight, zero-dependency code generators and compilers written in pure Python. It provides automated context managers (with scopes) to generate clean, highly-optimized C and Assembly code without the overhead of heavy Abstract Syntax Trees (AST).
Why this exists?
Traditional decompilers and transpilers rely on massive AST parsing trees and external dependencies (like LLVM). This project implements an elegant, pure Python Builder Pattern that tracks register allocations and memory states directly via Python's __enter__ and __exit__ magic methods. It generates fast, naked, and obfuscated-ready outputs.
License
This project is licensed under the GNU General Public License v3.0 (GPLv3). You are free to use, modify, and redistribute this software, provided that any derivative work remains open-source under the same license terms, ensuring explicit patent protections for all contributors and users.
Contribution & Development
This is a hacker-centric project. We welcome and encourage anyone to contribute to this repository. You are completely free to submit a Pull Request with a brand new code architecture, or suggest refactoring and optimizations for the existing codebase.
Feel free to clone the repository, write your modules, and help us make compilers simpler.
Quick Examples
1. C Generation Example
if __name__ == "__main__":
program = Mylang()
program.add_lib("cstdio")
with program.function(program, "main", "int") as main:
with main.for_loop("int i = 0", "i<10", "i++"):
with main.if_condintion("i % 2 == 0"):
main.print("i", variable=True)
main.return_val("0")
print(program.run())
2. Assembly Generation Example
if __name__ == "__main__":
mylan = mylang()
mylan.create_func("counter")
mylan.create_func("out")
mylan.create_func("check")
mylan.sys_exit(0, "out")
mylan.print("hello world", "counter")
mylan.newline("counter")
mylan.decrease("r10", "counter")
mylan.mov("r10", "10", "_start")
mylan.jmp("check", "_start")
mylan.cmp("r10", "0", jmp_if_equal="out", jmp_if_not_equal="counter", func="check")
mylan.jmp("check", "counter")
print(mylan.run())
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file delus-1.0.2.tar.gz.
File metadata
- Download URL: delus-1.0.2.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13f249f1f17fda840d1f6de8a0f8121b75166ef29f4ffea426b7c84ab48f5513
|
|
| MD5 |
977d91d6c222649a6ff43a2563196f0d
|
|
| BLAKE2b-256 |
9ae01dbb6466c7f314cada5dc205b51f01c975139c217b5a41e603a6f61dc46c
|
Provenance
The following attestation bundles were made for delus-1.0.2.tar.gz:
Publisher:
python-publish.yml on tamimdevlopment/delus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
delus-1.0.2.tar.gz -
Subject digest:
13f249f1f17fda840d1f6de8a0f8121b75166ef29f4ffea426b7c84ab48f5513 - Sigstore transparency entry: 2809644464
- Sigstore integration time:
-
Permalink:
tamimdevlopment/delus@7b3f805e3361bcae7e8d113e36394d121e328ede -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/tamimdevlopment
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7b3f805e3361bcae7e8d113e36394d121e328ede -
Trigger Event:
release
-
Statement type:
File details
Details for the file delus-1.0.2-py3-none-any.whl.
File metadata
- Download URL: delus-1.0.2-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45add74c33ed6f26f4fd2a5b5b6e351468d2fddca60fc50826830d0cda12d1f9
|
|
| MD5 |
0258b6cfcf3b4f77fe8a0743202f5c66
|
|
| BLAKE2b-256 |
3a4b39debfa91a93ed6bfb4543d550ee95ba43a732adf36687f432eeea6dfccb
|
Provenance
The following attestation bundles were made for delus-1.0.2-py3-none-any.whl:
Publisher:
python-publish.yml on tamimdevlopment/delus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
delus-1.0.2-py3-none-any.whl -
Subject digest:
45add74c33ed6f26f4fd2a5b5b6e351468d2fddca60fc50826830d0cda12d1f9 - Sigstore transparency entry: 2809644509
- Sigstore integration time:
-
Permalink:
tamimdevlopment/delus@7b3f805e3361bcae7e8d113e36394d121e328ede -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/tamimdevlopment
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7b3f805e3361bcae7e8d113e36394d121e328ede -
Trigger Event:
release
-
Statement type: