The Rust runtime boundary is documented in Rust Core and the ABI contract notes.
rust-runtime/src/foreign.rs
docs/binding_abi_contract.md
rust-runtime/tests/foreign_tests.rs