Skip to main content

rust_global

Function rust_global 

Source
pub fn rust_global(ctx: &Context, key: &str) -> String
Expand description

The Rust identifier the kernel constant key is emitted as.

A key is its own identifier, except where a SHADOW is involved (Context::shadows, the ruling of 2026-09-24). A declaration registered under a fresh identity (add_zero✝⟨1⟩), which no Rust identifier can spell, is emitted as the name its author wrote for as long as that name denotes it — so the author’s add_zero extracts to check_add_zero, the function an imperative Require that check_add_zero(). calls — and as <name>_shadowed<n> once a later declaration has taken the name. A declaration a live shadow hides is emitted as <key>_root, so it never meets the shadow under one Rust name. A constant derived from an identity follows it.