feat(jit): add cross-platform JIT support (Windows x64, ARM64)#1
Merged
farhan-syah merged 5 commits intomainfrom Dec 2, 2025
Merged
feat(jit): add cross-platform JIT support (Windows x64, ARM64)#1farhan-syah merged 5 commits intomainfrom
farhan-syah merged 5 commits intomainfrom
Conversation
Implement Microsoft x64 calling convention support for Windows JIT compilation, enabling JIT features on Windows, Linux, and macOS x86-64 systems. Key Changes: - Add calling_convention.rs module with platform-specific prologue/epilogue helpers - Update all JIT engines (DFA, Tagged NFA, Backtracking, Shift-Or) with dual ABI support - Use conditional compilation for System V AMD64 (Unix) vs Microsoft x64 (Windows) ABIs - Handle callee-saved register differences (RDI/RSI callee-saved on Windows only) - Add extern "win64" function signatures for Windows, "sysv64" for Unix CI Infrastructure: - ci.yml: General CI for pull requests (Linux all checks, Windows/macOS subset, MSRV) - jit.yml: JIT-specific CI triggered by branch patterns and JIT path changes Version: Bump to 0.1.0-beta.3
Implement native code generation for ARM64 platforms including Apple Silicon and ARM64 Linux/Windows, providing full feature parity with x86_64 JIT. Key additions: - ARM64 codegen infrastructure with AAPCS64 calling convention support - DFA JIT compiler for ARM64 with prefilter integration - Shift-Or JIT using bit-parallel execution on ARM64 - Backtracking JIT with capture group support - Tagged NFA JIT with lookaround and non-greedy quantifiers - Architecture detection and conditional compilation for both x86_64 and aarch64 - CI testing on macOS ARM64 (Apple Silicon) runners Implementation details: - ~3900 lines of ARM64-specific code across 5 new modules - Unified calling convention abstraction for x86_64 and ARM64 - Engine selector updated to detect ARM64 JIT capability - All 4 JIT execution engines (DFA, Shift-Or, Backtracking, Tagged NFA) fully functional This enables JIT compilation on modern ARM64 systems with performance characteristics similar to x86_64 JIT implementations.
Update all documentation and CI configuration to reflect the newly implemented ARM64 JIT support: - Add Linux ARM64 CI job using ubuntu-24.04-arm runner - Update platform support tables showing JIT availability on ARM64 - Revise conditional compilation examples to include aarch64 target - Update feature flag descriptions for cross-platform JIT support - Remove "(future)" annotation from aarch64.rs references Follows implementation in commits 179c755 and c40d01c.
6a4d51b to
2c0fd75
Compare
Resolve 81+ clippy warnings across source code, tests, and benchmarks by addressing lint violations including: - Simplify control flow (collapsible_if, collapsible_else_if, if_same_then_else) - Improve iteration patterns (manual_flatten, needless_range_loop, unused_enumerate_index) - Remove redundant operations (clone_on_copy, redundant_closure, let_and_return) - Simplify expressions (unwrap_or_default, int_plus_one, len_zero, manual_contains) - Fix documentation formatting (doc_lazy_continuation, doc_nested_refdefs, empty_line_after_doc_comments) - Optimize code patterns (manual_div_ceil, manual_is_multiple_of, manual_range_contains) - Reduce complexity (type_complexity, large_enum_variant) - Remove unused code (useless_format, useless_vec, byte_char_slices) Fix MSRV CI job by removing Cargo.lock before compatibility check, as v4 lockfile format requires Rust 1.78+ while MSRV is 1.70.
2c0fd75 to
e5e4137
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Platform Support
Changes
New Platform Support
src/jit/aarch64.rs)src/nfa/tagged/jit/aarch64.rs)src/vm/backtracking/jit/aarch64.rs)src/vm/shift_or/jit/aarch64.rs)Architecture
calling_convention.rsmodule abstracts platform-specific ABI detailsCI
.github/workflows/ci.yml: General CI for all platforms.github/workflows/jit.yml: JIT-specific tests on Linux (x86-64, ARM64), macOS (x86-64, ARM64), and WindowsDocumentation
Test plan