DEV Community

Divyanshu Sinha
Divyanshu Sinha

Posted on

🚀 Introducing TigerASM: Your Rust-to-Python Runtime Assembler Library 🐯⚡

I’m thrilled to announce the first release of TigerASM, a high-performance runtime assembler library built in Rust with Python bindings via PyO3. If you’ve ever wanted the power of assembly directly accessible in Python without sacrificing speed, this is for you.

Absolutely! Here’s a polished developer-friendly post draft for dev.to about TigerASM. I’ve framed it to highlight your Rust-to-Python bridge, speed, and unique features:


🚀 Introducing TigerASM: Your Rust-to-Python Runtime Assembler Library 🐯⚡

I’m thrilled to announce the first release of TigerASM, a high-performance runtime assembler library built in Rust with Python bindings via PyO3. If you’ve ever wanted the power of assembly directly accessible in Python without sacrificing speed, this is for you.


🐅 What is TigerASM?

TigerASM is a runtime assembler that allows you to write, execute, and manipulate assembly instructions dynamically:

  • Supports x86-64 and ARM64 architectures
  • Write assembly instructions in Python and execute them at native speed
  • Full control over registers and memory from Python
  • Comes with a Python wheel (.whl) for easy installation

Think of it as giving Python the muscle of Rust + assembly, all in a single package.


⚡ Why TigerASM?

  • Blazing Speed: Python + Rust + DynASM runtime means your assembly code runs in nanoseconds.
  • Beginner-Friendly: No complex setup needed — just install the wheel and import tigerasm.
  • Safe and Licensed: Released under LGPL v3, so you can use it in both open-source and proprietary projects.
  • Expandable: Add new instructions or extend it for AI, game engines, or low-level Python optimizations.

🏁 Quick Start

Install TigerASM via pip:

pip install tigerasm
Enter fullscreen mode Exit fullscreen mode

Use it in Python:

from tigerasm import TigerASM

# Create assembler instance
asm = TigerASM()
asm.setup("x86_64")  # or "aarch64" for ARM64

# Write assembly code
asm.asm("""
    mov rax, 42
    add rax, 8
    ret
""")

# Execute and get result
asm.execute()
result = asm.get("rax")  # Returns 50
print(f"Result: {result}")
Enter fullscreen mode Exit fullscreen mode

Check the version:

import tigerasm
print(tigerasm.version())  # 0.1.0
Enter fullscreen mode Exit fullscreen mode

🤝 Contributing

Contributions are welcome! Please ensure:

  • Code follows Rust best practices
  • New instructions are documented
  • Tests are included for new features
  • README and examples are updated

📄 License

License
TigerASM is licensed under the GNU Lesser General Public License v3.0 or later (LGPL-3.0-or-later).
See the LICENSE file for details.


🙏 Acknowledgments

Built with:

  • PyO3 – Rust bindings for Python
  • dynasm-rs – Dynamic assembly runtime

Happy Assembling! 🐯⚡

Top comments (1)

Collapse
 
divyanshusinha136 profile image
Divyanshu Sinha • Edited

Note: TigerASM executes native machine code in the current Python process.
Incorrect assembly can crash Python or corrupt memory.