Skip to main content

Delus

pypi project : https://pypi.org/project/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

delus-1.0.4.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

delus-1.0.4-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file delus-1.0.4.tar.gz.

File metadata

  • Download URL: delus-1.0.4.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for delus-1.0.4.tar.gz
Algorithm Hash digest
SHA256 a82d9f80be0f2b2c841712c10a689e57918cebea31d337d8e8853d0927c210b8
MD5 f1e2964e346153cdbc44a48a7effd173
BLAKE2b-256 ed152d94599480cf44b1c460cb3770cce17ccd7c060db0c16daa9212b341bddb

See more details on using hashes here.

Provenance

The following attestation bundles were made for delus-1.0.4.tar.gz:

Publisher: python-publish.yml on tamimdevlopment/delus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file delus-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: delus-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for delus-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b912d2e60a0f6ad6e1cc208431df7186dc114a41f9968c6f8ad173d3b8c79c09
MD5 c1d719526000eeb295939b1060601dbe
BLAKE2b-256 a03d50073ac66f8e52cbbf435ac21d9ded3d134a654287d9b90f2934166d41dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for delus-1.0.4-py3-none-any.whl:

Publisher: python-publish.yml on tamimdevlopment/delus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.0.5

2 files

This release

1.0.4 This release

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page