asmjit icon indicating copy to clipboard operation
asmjit copied to clipboard

Low-latency machine code generation

AsmJit

AsmJit is a lightweight library for machine code generation written in C++ language.

See asmjit.com page for more details, examples, and documentation.

Documentation

Breaking Changes

Breaking the API is sometimes inevitable, what to do?

  • See Breaking Changes Guide, which is now part of AsmJit documentation.
  • See asmjit tests, they always compile and provide implementation of many use-cases:
    • asmjit_test_emitters.cpp - Tests that demonstrate the purpose of emitters.
    • asmjit_test_assembler_x86.cpp - Tests targeting AsmJit's Assembler (x86/x64).
    • asmjit_test_compiler_x86.cpp - Tests targeting AsmJit's Compiler (x86/x64).
    • asmjit_test_instinfo.cpp - Tests that query instruction information.
    • asmjit_test_x86_sections.cpp - Multiple sections test.
  • Visit our Official Chat if you need a quick help.

Project Organization

  • / - Project root.
    • src - Source code.
      • asmjit - Source code and headers (always point include path in here).
        • core - Core API, backend independent except relocations.
        • arm - ARM specific API, used only by ARM and AArch64 backends.
        • x86 - X86 specific API, used only by X86 and X64 backends.
    • test - Unit and integration tests (don't embed in your project).
    • tools - Tools used for configuring, documenting, and generating files.

TODO

  • [ ] Core:
    • [ ] Add support for user external buffers in CodeBuffer / CodeHolder.
  • [ ] Ports:
    • [ ] 32-bit ARM/Thumb port.
    • [ ] 64-bit ARM (AArch64) port.
    • [ ] RISC-V port.

Support

Notable Donors List:

Authors & Maintainers