Crate rustd_core

Crate rustd_core 

Source
Expand description

§HLX Core

Core types and IR for the HLX deterministic ML substrate.

This crate defines:

  • Value: The 7 fundamental types + Contract
  • Instruction: The IR for computation
  • Capsule: Integrity-wrapped instruction sequences
  • LC-B encoding/decoding

§Axioms

  • A1 (Determinism): Same input → same LC-B output
  • A2 (Reversibility): decode(encode(v)) == v
  • A3 (Bijection): 1:1 correspondence between values and encodings
  • A4 (Universal Value): All types lower to this core

Re-exports§

pub use value::Value;
pub use value::Contract;
pub use value::FieldIndex;
pub use instruction::Instruction;
pub use instruction::TensorShape;
pub use instruction::Register;
pub use rustd_crate::RustDCrate;
pub use error::RustDError;
pub use error::Result;
pub use builtins::BuiltinRegistry;
pub use builtins::BuiltinSignature;
pub use builtins::ParamType;
pub use builtins::ReturnType;
pub use builtins::BackendImpl;
pub use capabilities::RuntimeCapabilities;
pub use capabilities::BuiltinSpec;
pub use capabilities::BuiltinSpecBuilder;
pub use capabilities::StabilityLevel;
pub use handle::Handle;
pub use handle::HandleMetadata;
pub use handle::Tensor;
pub use handle::Window;
pub use handle::Buffer;
pub use handle::Shader;
pub use handle::Image;
pub use handle::Read;
pub use handle::Write;
pub use handle::ReadWrite;
pub use handle::CPU;
pub use handle::GPU;
pub use handle::Shared;
pub use handle::TensorHandle;
pub use handle::WindowHandle;
pub use handle::BufferHandle;
pub use handle::ShaderHandle;
pub use handle::ImageHandle;
pub use handle::GpuTensorWrite;
pub use handle::GpuTensorRead;
pub use handle::GpuTensorRW;
pub use handle::CpuTensorWrite;
pub use handle::CpuTensorRead;
pub use handle::SharedTensorRead;
pub use handle::ResourceType;
pub use handle::AccessPattern;
pub use handle::MemoryLocation;

Modules§

builtins
Unified Builtin Function Registry
capabilities
Runtime Capability Schema
clinical
Shared entity type definitions and keyword patterns for clinical entity extraction. Used by both Python and C/Ada FFI bindings to ensure consistency.
error
Error types for HLX operations
ffi
FFI utilities for header generation and type mapping
handle
Strongly-Typed Handle System with Typestate Pattern
instruction
HLX Instruction Set
lcb
LC-B Wire Format
rustd_crate
HLX Crate
value
HLX Value System

Macros§

builtin_spec
Macro to define builtins more concisely

Constants§

CRATE_VERSION
Crate format version
LCB_MAGIC
Magic byte for LC-B format
MAX_DEPTH
Maximum nesting depth (determinism constraint)