Skip to content

UniFFI Glossary

This page contains terms used throughout these docs

Scaffolding

UniFFI-generated Rust code. This is an extern "C" API that helps the foreign bindings make Rust calls.

Scaffolding is generated by Rust macros and not found in source code. If you use proc-macro, you can see it by using cargo expand or expanding the UniFFI macros in an IDE. If you use UDL files, you can see it by running cargo build, then finding the generated file in the target directory.

Bindings

UniFFI-generated code in a foreign language. This implements the exported Rust API by calling in to the Rust scaffolding.

Lower

The process of converting a high-level Rust type into a lower-level FFI type in the scaffolding code. Alternatively, converting a high-level foreign language type to the same FFI type in the bindings code. See lifting and lowering for details.

"lowered type", refers to the FFI type that a high-level top lowers to. For example, RustBuffer is the lowered type for String.

Lift

The process of converting a low-level FFI type into a high-level Rust type into in the scaffolding code. Alternatively, converting the same FFI type into a high-level foreign language type in the bindings code. See lifting and lowering for details.

The process of converting a low-level FFI type into a high-level Rust/foreign language type as described in lifting and lowering.