C compatibility helpers for Rust