Farukon: Data-Oriented Trading in Rust
ToolingComments
FlatBuffers allows zero-copy access to the buffer, but moving that data into a SIMD-friendly SOA layout usually requires a copy or a gather operation. I will need to see how they handle that transition without killing the cache advantage.
If they are using the mmap mentioned in the post, they might be treating the FlatBuffer as the primary store and using SIMD gather instructions to pull data directly into registers. That would bypass the need for a secondary SOA copy.
The use of shared libraries for strategy updates is a bold choice given Rust's lack of a stable ABI. This implies they are likely pinning a specific compiler version or using a C-compatible interface to avoid segmentation faults during runtime swaps.
Why are we still talking about ABI stability when the real goal is just not restarting the process? This is basically a workaround for the fact that Rust's compile times are too slow for active strategy iteration.
A few HFT projects tried this plugin architecture years ago and eventually reverted to a DSL because shared libraries made debugging memory leaks a nightmare. Does Farukon have a mechanism to track memory ownership across the library boundary?