Skip to main content

Module db

Module db 

Source
Expand description

Shared Hyper instance for compile-time validation.

One CompileTimeDb is shared across all macro invocations in a single crate compilation (rustc spawns one proc-macro host process per crate). The instance is lazily initialized on first use via get_or_init() and dropped when the host process exits.

Structs§

CompileTimeDb
A live connection to an in-process Hyper instance used for SQL dry-runs.

Functions§

get_or_init
Returns a reference to the global Mutex<CompileTimeDb>, initializing it on the first call.