Skip to content

Look into generating pure python code and possibly Cython Code as output #18

@Vizonex

Description

@Vizonex

ISSUE

I think in a future update we should look at generating the following items

  • Pure Python Code

    • aiohttp would be a good example of a library that could benefit, this way some common vulnerabilitites with their current pure python http parser can get fully patched.
    • People who do not have the diskspace for a C Compiler would benefit as well but may get decreased performance.
    • pytesting generated parsers would only get easier as a result which could be both a blessing and a curse (C wouldn't be fully tested but pure python would)
  • Cython Code (Saves a bit of time if we can either chain it to C or Follow a pure python format but have it be fine-tuned to fully optimize it) I have an experiment concept shoved in as well incase but the problem with it right now is making an ignorable list of functions to skip over or etc... (chaining it should not be hard if this approach takes full swing (might even lead to a llh2 rewrite which save a few headaches with that C Library))

  • I would like this to be done before version 0.4.0 is reached if possible but we will have to wait and see I haven't figured out a good format
    but the goto satements would likely get replaced by python function calls (where each state correlates to a python function) and enums use IntEnum types (Cython may use cpdef or cdef enum types) for instance.

  • We could look into match-case statements soon since now 3.9 is unsupported by the python maintainers so dropping 3.9 could open the gates up for new possibilities to take shape...

  • bug
  • optimization idea

TO REPRODUCE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions