Tag
Diplomat is a multi-language unidirectional FFI tool for wrapping Rust libraries, designed to expose Rust APIs to languages like C++, JS, Dart, and JVM without requiring FFI expertise, addressing a gap in the Rust tooling ecosystem.
Nia Deckers presented a new scheme at RustWeek to implement FFI execution for Miri using ptrace and SIGSEGV. The method involves forking a process, setting memory protection, and disassembling instructions to determine memory access details, and uses mutex locks to resolve race conditions. This approach allows Miri to track any external function call at the cost of '8000 segfaults per second', and unexpectedly provides debugger functionality.