feat: add optional rust-based acceleration engine & security gateway#225
feat: add optional rust-based acceleration engine & security gateway#225Mr-Charvaka wants to merge 1 commit into
Conversation
|
Thanks for the contribution. I reviewed this PR, but I don't think it is ready to merge yet because it changes runtime behavior and adds a new Rust/PyO3 execution path without enough packaging, compatibility, and test coverage. Could you please revise it with the following changes?
I could not run Rust tests locally because |
|
@hkalbertkim Thaks for reviewing and providing the insights! |
Summary
This PR introduces the KORA Rust Acceleration & Security Engine, providing an optional high-performance execution and validation backend written in Rust, connected via PyO3 FFI.
To prevent adoption friction for maintainers, it is designed with a graceful fallback policy:
KORA_USE_RUST=1in the environment to route normalization, validation, and task loop execution through Rust.Key Additions
kora-rust/Crate:cargo test --test differential_fuzz) running 10,000 mutated inputs to ensure 100% engine stability (0 crashes, 0 panics).cargo bench) reporting nanosecond scheduling latency.Benchmarks (Reproducible via
python benchmark.py)Latency average:
124.5 ms| Rust2.0 ms(62.0x speedup)20.46s| Rust0.25s(81.5x speedup)Peak RSS Memory savings:
204.8 MB| Rust197.1 MB(7.68 MB saved in execution, 23.45 MB saved in validation).See METHODOLOGY.md for detailed telemetry, memory, and FFI startup latency analysis.