pub struct StandardLibrary;Expand description
Standard library definitions.
Implementations§
Source§impl StandardLibrary
impl StandardLibrary
Sourcepub fn register(ctx: &mut Context)
pub fn register(ctx: &mut Context)
Register all standard library definitions in the context.
A thousand checked declarations and their checked equation lemmas: production code asks
the process’s one registration, StandardLibrary::context, instead.
Sourcepub fn context() -> &'static Context
pub fn context() -> &'static Context
The standard library’s context, registered once per process.
A registered Context is Arc-backed and copy-on-write throughout (every mutating
accessor goes through Arc::make_mut), so a caller that only asks questions borrows this
one, and a caller that extends it clones it: about a microsecond, sharing every table
until the clone writes to it, against the ~0.3 s (optimized) of registering again. The
clone is an independent value; the attestation caches it shares are keyed by the registry
generation they inspected, so a clone that diverges never reads another’s answer.
the_cached_prelude_is_indistinguishable_from_a_fresh_one pins it against a fresh
registration.