https://github.com/brupelo/py2bin - Enhancing Python Bytecode Transpiler to LLVM with Executable Generation
Budget: €30 – €50 EUR
Looking for an expert freelancer with deep knowledge in **LLVM**, **Python bytecode**, **compilers**, and **transpilation** to join a growing project aimed at creating a robust **Python to LLVM transpiler** using **llvmlite**. This is a non-trivial and technically challenging project that requires a deep understanding of how Python's bytecode works, how LLVM handles low-level optimizations, and how to generate executables from source code.
**Project Scope:**
The transpiler currently has the foundational structure in place, with handlers implemented for almost all Python bytecodes. Some handlers have basic implementations, while others are incomplete or buggy. The goal is to iteratively enhance the transpiler so that it can generate correct executables from Python snippets, ensuring the correct output is produced for a wide variety of Python code, without breaking the current functionality.
**Your Task:**
You will be assigned specific milestones and tasks, starting with small Python snippets. The first task will focus on ensuring that the transpiler can transpile Python bytecode for certain simple snippets, generating executables that produce the right output. At the same time, you'll need to ensure that no existing tests break and that the code remains fully functional. As you progress, we’ll gradually expand the scope, adding new features and more complex snippets to handle.
This task is designed to progressively enhance the functionality of the transpiler, with the end goal being able to generate executables from real Python code.
**Milestones:**
**Task: Small Python Snippet Handling (Initial Focus)**
- Goal: Ensure the transpiler can transpile small Python snippets and generate correct executables.
- You’ll work on improving specific handlers to support the execution of common operations, making sure they generate the right LLVM IR and correct output when compiled into executables.
- Deadline: <1week
**Required Skills:**
- **LLVM**: Deep understanding of LLVM, specifically llvmlite, and experience working with LLVM-based transpilers or compilers.
- **Python Bytecode**: Familiarity with Python’s bytecode, the Python compiler, and how Python code is executed at the bytecode level.
- **Compilers**: Strong understanding of compiler design, particularly in the context of generating intermediate representations (IR) and handling different programming constructs.
- **Transpilation**: Experience building or improving transpilers (specifically those that convert Python code into lower-level representations like LLVM IR).
- **Debugging**: Ability to debug complex, low-level code and deal with hard-to-find issues in transpilation and bytecode generation.
- **Version Control**: Experience using Git for version control in collaborative environments.
**Deliverables:**
- Fixed and enhanced handlers for Python bytecode operations.
- A transpiler capable of generating correct executables from Python code snippets.
- Reports with specific test results ensuring that the transpiler works as expected (all existing tests passing, and new ones passing as well).
**Working Environment:**
- You will be working independently, with milestone-based deliverables.
- You’ll have access to the full code base, and we will maintain regular communication for feedback, collaboration, and troubleshooting.
- The initial task is expected to take around 1 week (or less) depending on the complexity of the task.
**Please Apply If You Have:**
- Proven experience with LLVM-based projects.
- Strong understanding of how Python works under the hood, especially the Python bytecode and its execution.
- Practical experience in transpiling, compiler construction, and low-level optimization.
- An ability to debug complex issues and a commitment to writing clean, maintainable code.
This is an exciting opportunity to be involved in building a cutting-edge tool, and I'm looking forward to working with a skilled expert to make this transpiler a reality!
**Project Scope:**
The transpiler currently has the foundational structure in place, with handlers implemented for almost all Python bytecodes. Some handlers have basic implementations, while others are incomplete or buggy. The goal is to iteratively enhance the transpiler so that it can generate correct executables from Python snippets, ensuring the correct output is produced for a wide variety of Python code, without breaking the current functionality.
**Your Task:**
You will be assigned specific milestones and tasks, starting with small Python snippets. The first task will focus on ensuring that the transpiler can transpile Python bytecode for certain simple snippets, generating executables that produce the right output. At the same time, you'll need to ensure that no existing tests break and that the code remains fully functional. As you progress, we’ll gradually expand the scope, adding new features and more complex snippets to handle.
This task is designed to progressively enhance the functionality of the transpiler, with the end goal being able to generate executables from real Python code.
**Milestones:**
**Task: Small Python Snippet Handling (Initial Focus)**
- Goal: Ensure the transpiler can transpile small Python snippets and generate correct executables.
- You’ll work on improving specific handlers to support the execution of common operations, making sure they generate the right LLVM IR and correct output when compiled into executables.
- Deadline: <1week
**Required Skills:**
- **LLVM**: Deep understanding of LLVM, specifically llvmlite, and experience working with LLVM-based transpilers or compilers.
- **Python Bytecode**: Familiarity with Python’s bytecode, the Python compiler, and how Python code is executed at the bytecode level.
- **Compilers**: Strong understanding of compiler design, particularly in the context of generating intermediate representations (IR) and handling different programming constructs.
- **Transpilation**: Experience building or improving transpilers (specifically those that convert Python code into lower-level representations like LLVM IR).
- **Debugging**: Ability to debug complex, low-level code and deal with hard-to-find issues in transpilation and bytecode generation.
- **Version Control**: Experience using Git for version control in collaborative environments.
**Deliverables:**
- Fixed and enhanced handlers for Python bytecode operations.
- A transpiler capable of generating correct executables from Python code snippets.
- Reports with specific test results ensuring that the transpiler works as expected (all existing tests passing, and new ones passing as well).
**Working Environment:**
- You will be working independently, with milestone-based deliverables.
- You’ll have access to the full code base, and we will maintain regular communication for feedback, collaboration, and troubleshooting.
- The initial task is expected to take around 1 week (or less) depending on the complexity of the task.
**Please Apply If You Have:**
- Proven experience with LLVM-based projects.
- Strong understanding of how Python works under the hood, especially the Python bytecode and its execution.
- Practical experience in transpiling, compiler construction, and low-level optimization.
- An ability to debug complex issues and a commitment to writing clean, maintainable code.
This is an exciting opportunity to be involved in building a cutting-edge tool, and I'm looking forward to working with a skilled expert to make this transpiler a reality!