Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

name mangling

How the compiler renames functions to encode extra information, which C can't read.

Rust mangles symbol names to encode paths and generics; #[unsafe(no_mangle)] keeps the plain name so C code can link to the function.

Loading interactive…

Examples

  • #[unsafe(no_mangle)] keeps parcel_cost under its own name so C can link to it; in edition 2024 the bare #[no_mangle] is an error.

Read the full section →