1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! Inventory-backed indirection for compiler-primitive shader sources.
//!
//! Law B forbids concrete target asset files under `vyre-foundation`. The
//! six compiler primitives (dataflow_fixpoint, dominator_tree,
//! recursive_descent, string_interner, typed_arena, visitor_walk) still
//! have GPU kernels, but those kernel assets live in concrete driver crates.
//!
//! This module declares the `CompilerPrimitiveShader` inventory
//! record and a fallback-free resolver. Driver crates submit records
//! through `inventory::submit!`; when a compiler primitive's CPU
//! reference needs the target-text source, it calls `source` which
//! walks the inventory and returns the registered string or `None`.
/// Inventory record pairing a compiler-primitive op id with target shader source.
///
/// Driver crates `inventory::submit!` one of these per compiler primitive.
/// The `source` fn is a plain `fn() -> &'static str` so every
/// `include_str!` lives inside the driver crate that actually ships the
/// asset.
collect!;
/// Default provider that walks the inventory and returns the first matching
/// registration.
;
/// Resolve the target-text source for `op` using the default inventory provider.