Skip to main content

Crate celox

Crate celox 

Source

Re-exports§

pub use crate::testbench::AssertionResult;
pub use crate::testbench::TestResult;
pub use crate::testbench::TestResultDetailed;
pub use celox_frontend_sdk as frontend_sdk;
pub use backend::wasm_codegen;

Modules§

native_backend
Re-exports for the custom native backend (for testing/integration).
testbench
Native testbench execution for Veryl #[test] modules.

Macros§

veryl_test

Structs§

AppendedNativeImage
Result of finding and decoding an image appended to another byte sequence.
BigUint
A big unsigned integer type.
CompilationTrace
CompilationTraceResult
CraneliftDiagnostics
Fine-grained Cranelift backend options beyond the optimization level.
CraneliftOptions
Fine-grained Cranelift backend options beyond the optimization level.
DesignReflection
DiagnosticsOptions
Complete explicit diagnostics configuration for a simulator build.
ElaboratedDesign
Backend-neutral semantic design data after hierarchy flattening.
EventRef
Opaque handle to a compiled event (clock / async-reset) function. Holds the JIT-compiled function pointer directly — no indirection. Obtained once via JitBackend::resolve_event and passed to JitBackend::eval_apply_ff_at for zero-cost dispatch.
EventTopology
Source-independent event-domain topology after elaboration.
FrontendArtifact
Fully elaborated frontend result. The first SDK version intentionally models one flattened module; hierarchical netlists can be flattened by the producing frontend without affecting runtime signal names.
FrontendLookup
Source-language-independent lookup retained for diagnostics and public paths. Parser-native IDs are projected into SourceVarId before this artifact is built and do not cross into runtime metadata.
IOContext
InjectedCall
One synchronous call into an injected component implementation.
InjectedComponents
Component definitions injected by an embedding API for one simulator.
InjectedNamedValue
InjectedPort
InjectedResult
Effects returned by an injected callback. Outputs are staged using the same component/NBA path as compiled native and Wasm components.
InstanceHierarchy
Hierarchical instance tree with resolved signals.
InstancePath
InterpBackend
A SimBackend that interprets the laid-out SIR instead of executing generated machine code.
JitBackend
LaidOutProgram
Optimized SIR whose physical state layout has been finalized.
LayoutRequirements
Semantic constraints produced by optimization and consumed when physical state layout is finalized.
NamedEvent
A named event with its resolved ID and event reference.
NamedSignal
A named signal with its resolved memory reference and metadata.
NativeBackend
NativeCodeEntry
One callable function in a packed native code image.
NativeCompilation
A code-generated native program that has not been loaded into executable memory or initialized as a simulator yet.
NativeDiagnostics
NativeDumpOptions
NativeEventRef
Compiled event handle for native backend. Holds the function pointer directly — no indirection at call time.
NativeProfileBlock
One native JIT block selected by an external profile.
NativeProgramImage
Pointer-free native compiler artifact which can be attached to the precompiled Celox runtime.
NativeProgramInstance
One independently mutable instance of a precompiled native program.
OptimizeOptions
Controls which SIR optimization passes are enabled.
OptimizedSir
A pre-layout compiler artifact whose SIR optimization pipeline has completed successfully.
ReflectionScope
ReflectionScopeId
ReflectionSignal
ReflectionSignalId
ResolvedAccess
One memory access with its dynamic offset components resolved.
RuntimeDesign
Canonical runtime design model after frontend scheduling.
RuntimeDiagnostics
Diagnostics owned by the simulator facade and runtime.
RuntimeEventDrain
RuntimeFormatContext
RuntimeInstance
One elaborated runtime instance with direct state-address indices.
RuntimeProgram
Source-independent metadata retained while a compiled design is executing.
RuntimeSchema
Source-independent runtime diagnostics and observable event descriptions.
RuntimeVariable
Source-facing metadata for one flattened runtime state object.
SharedJitCode
Immutable compilation result that can be shared across simulator instances.
SharedNativeCode
Shared compiled code for the native backend. Can be cloned (via Arc) to create multiple simulator instances that share the same compiled machine code.
SignalRef
Simulation
A timed simulation wrapper around the core logic engine.
Simulator
The core logic evaluation engine.
SimulatorBuilder
A fluent builder for configuring and initializing a Simulator or Simulation.
SimulatorError
A simulator error that may also carry accumulated compilation warnings.
SimulatorOptions
SirDiagnostics
Diagnostics and additional verification for the SIR optimizer.
SourceLocation
SourceVarId
Frontend-local identity of a source variable within one module.
StoreSnapshot
Pre-store snapshot of a stored range, used to detect whether a store actually changed any covered bit before enabling comb capture observers.
TraceOptions
UnoptimizedSir
Lowered SIR whose backend-independent optimization pipeline has not run.
VariableInfo
VcdSignalDesc
Describes a signal for VCD recording.
VcdWriter
WasmBackend
The runtime WASM backend.

Enums§

AddrLookupError
Error returned by RuntimeProgram::get_addr when a path-based variable lookup fails.
ClockType
CodegenError
Structured failure while preparing executable simulator code.
CompilationWarning
A non-fatal source diagnostic retained by a successfully built simulator.
CraneliftOptLevel
Cranelift backend optimization level.
DeadStorePolicy
Controls which stores the dead store elimination pass preserves.
DomainKind
FrontendArtifactError
FrontendDiagnostic
Celox-specific source diagnostics produced after Veryl analysis but before source identities are discarded by lowering.
InjectedHook
The lifecycle operation requested from an injected component.
InjectedValue
A value crossing the boundary of an in-process component callback.
InterpError
Why an interpreted execution unit stopped abnormally.
LoweringPhase
The compilation phase where an unsupported feature was encountered.
MemoryLayoutMode
NativeImageArchitecture
Native ISA required by an appended program image.
NativeImageContainerError
Failure while encoding or discovering a native image container.
NativeProgramLoadError
Failure while discovering or attaching a compiler-produced native image.
NativeSignalIdentity
Source-independent identity shared by reflected handles for one signal.
OptLevel
Optimization level presets, analogous to GCC’s -O flags.
ParserError
PortTypeKind
RegallocAlgorithm
Register allocator algorithm for the Cranelift backend.
ResetType
RuntimeErrorCode
RuntimeEvent
SchedulerError
SignalDirection
SimulatorErrorKind
The specific kind of simulator error.
SirPass
Individual SIR optimization passes that can be toggled.
UnitExit
Outcome of one interpreted unit invocation.
VariableKind
Source-language-independent role of a frontend variable.

Traits§

EventHandle
Marker trait for backend-specific event handles.
InjectedComponentHandler
Synchronous component implementation supplied by an embedding runtime.
InterpMachine
Storage and side-effect interface driven by the interpreter.
SimBackend
Abstraction over different simulation backends (JIT, WASM, etc.).

Functions§

compile_frontend_to_sir
Compile an elaborated external-frontend artifact to optimized SIR.
compile_to_sir
Compile Veryl source code to the SIR (Simulation IR) representation.
execute_unit
Execute one execution unit on the interpreter.
get_byte_size
register_static_component
Registers an in-process Veryl component implementation.
register_static_component_manifest
Registers the manifest paired with an in-process component implementation.
render_diagnostic
Render a miette::Diagnostic to a plain-text string (no ANSI colors).

Type Aliases§

AbsoluteAddr
Source-independent identity of one elaborated state object.
DefaultBackend
Default simulation backend: custom native when it matches the compilation target, and Cranelift when a host-side cross-codegen feature is enabled.
DefaultEventRef
MemoryLayout
RuntimeErrorInfo
SirProgram
SourceAddr