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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// Every lint below is allowed for a documented reason. New lints from
// nursery/pedantic/restriction are NOT auto-allowed — broad blanket allows
// were removed deliberately so that future clippy findings surface as CI
// warnings instead of being silently swallowed.
`.
must_use_candidate,
// Builder APIs take owned values by design.
needless_pass_by_value,
// Indexed arithmetic is clearer than iterator chains for GPU-shape loops.
needless_range_loop,
// Generated WGSL strings use `r##` for quote safety.
needless_raw_string_hashes,
// Type names repeat module names for cross-crate discoverability.
module_name_repetitions,
// `mod X` in `X.rs` is the canonical vyre module layout.
module_inception,
// Math code uses short similar names (a/A, x/X) by convention.
similar_names,
// Internal helpers with stdlib-adjacent names are intentional for clarity.
should_implement_trait,
// Enforcer dispatch arms can share a body but represent distinct cases.
match_same_arms,
// Hot paths in the pipeline assemble strings incrementally.
format_push_string,
// GPU kernel dispatchers take many parameters by design (buffer slots).
too_many_arguments,
// Hash compressors and regex compilers have long inlined bodies.
too_many_lines,
// Trait signatures force `&T` for small Copy types.
trivially_copy_pass_by_ref,
// `Result<T, E>` with a single error variant keeps the API
// forward-compatible as new error variants land.
unnecessary_wraps,
// Or-patterns are expanded for readability in large match tables.
unnested_or_patterns,
// GPU buffer sizes like `0x12345678` are more readable without `_`
// separators in shader contexts.
unreadable_literal,
// Prose doc comments use type names that clippy wants backticked; our
// doc style sentences already read naturally.
doc_markdown
)]
//! # vyre — LLVM-for-GPU
//!
//! Vyre is a GPU compute intermediate representation (IR) and compiler
//! substrate. Just as LLVM lets frontends emit a single IR that lowers to
//! many CPU backends, vyre lets frontends emit a single IR that lowers to
//! WGSL, Metal, CUDA, or a pure-Rust reference interpreter. The crate root
//! re-exports the frozen public API: the `Program` type, the `VyreBackend`
//! trait, and the standard operation library.
//!
//! Frontends, backends, and conformance tools depend only on the stable
//! types exported here. Changing the WGSL lowering path never breaks a
//! frontend; changing a frontend AST never affects backend dispatch logic.
//! This module is the single source of truth for the vyre public API.
/// The vyre intermediate representation.
///
/// This module defines `Program`, the frozen, serializable IR that every
/// frontend emits and every backend consumes. It has zero external
/// dependencies so that spec tools can parse it without pulling in GPU
/// libraries.
/// Layer 1 and Layer 2 operation specifications.
///
/// This module contains the standard library of vyre operations: arithmetic,
/// bitwise, comparison, memory, control flow, workgroup coordination, and
/// more. Every registered op carries a CPU reference and a conform spec.
/// IR to target-code lowering.
///
/// Lowering transforms a validated `Program` into backend-specific code
/// such as WGSL. Frontends do not depend on this module; it is consumed
/// only by backend implementations.
/// Unified error types for the entire crate.
///
/// Every fallible operation in vyre returns the same `Error` enum so that
/// callers only need to learn one failure vocabulary. Errors are
/// prescriptive: every variant includes a `Fix:` hint.
pub
pub
pub
// Previously: pub mod bytecode — a 637-LOC stack-machine VM publicly
// re-exported from core. README forbids an opcode interpreter ("There is
// no bytecode VM, no opcode interpreter") and the conform Cat-B tripwire
// scans for bytecode::Program / bytecode::Instruction as forbidden
// patterns. Deleted 2026-04-17. Rule evaluators compose ops in vyre IR
// directly; no stack machine.
/// Re-export of the backend error type, dispatch config, and backend trait.
///
/// These three items form the frozen backend contract. Consumers import
/// them from the crate root so that their code remains stable when the
/// internal module layout changes.
pub use ;
/// Re-export of the primary error type and result alias.
///
/// `Error` is the unified failure enum for all vyre operations. `Result`
/// is the corresponding alias used throughout the public API.
pub use ;
/// Re-export of the core IR program type and validation entry point.
///
/// `Program` is the frozen IR container. `validate` is the function that
/// checks a program for structural and semantic correctness before it is
/// handed to a backend.
pub use ;
/// Re-export of the native scan match result type.
///
/// `Match` represents a byte-range hit produced by pattern-scanning
/// engines such as the DFA or Aho-Corasick implementations.
pub use Match;