Skip to main content

Crate harn_kernel

Crate harn_kernel 

Source
Expand description

Portable Harn compiler and deterministic execution kernel.

This crate is deliberately a dependency leaf with no filesystem, network, process, clock, random, model, or async-runtime authority.

Re-exports§

pub use artifact::compile_program;
pub use artifact::compile_program_package;
pub use artifact::compile_source_package;
pub use artifact::semantic_abi_fingerprint_hex;
pub use artifact::ArtifactLimits;
pub use artifact::Diagnostic;
pub use artifact::EntryKind;
pub use artifact::PortableModuleSource;
pub use artifact::PortablePackageSource;
pub use artifact::ProgramArtifact;
pub use artifact::ProgramModule;
pub use artifact::ARTIFACT_VERSION;
pub use benchmark::benchmark_terminal_digest;
pub use benchmark::portable_benchmark_json_schema;
pub use benchmark::BenchmarkBuildProfile;
pub use benchmark::BenchmarkEntryKind;
pub use benchmark::BenchmarkProvenance;
pub use benchmark::BenchmarkStatistics;
pub use benchmark::BenchmarkStatisticsError;
pub use benchmark::BenchmarkTarget;
pub use benchmark::CompileMeasurements;
pub use benchmark::DispatchMeasurements;
pub use benchmark::PortableBenchmarkReceipt;
pub use benchmark::PORTABLE_BENCHMARK_SCHEMA_VERSION;
pub use benchmark::PORTABLE_MAX_COMPILE_ITERATIONS;
pub use benchmark::PORTABLE_MAX_DISPATCH_ITERATIONS;
pub use benchmark::PORTABLE_MAX_WORKERS;
pub use compiler::CompileError;
pub use compiler::CompiledCallableEntry;
pub use compiler::CompiledPortableModule;
pub use compiler::Compiler;
pub use compiler::CompilerOptions;
pub use compiler::PortableExportKind;
pub use compiler::PortableImport;
pub use compiler::PortableSourceModule;
pub use compiler::PortableSourcePackage;
pub use execution::replay;
pub use execution::resume;
pub use execution::start;
pub use execution::CapabilityRequest;
pub use execution::CapabilityResult;
pub use execution::DataValue;
pub use execution::Execution;
pub use execution::GrantSet;
pub use execution::ValueShape;
pub use execution::PORTABLE_MAX_SNAPSHOT_BYTES;
pub use opcode::opcode_abi_fingerprint;
pub use opcode::Op;
pub use opcode::OperandKind;
pub use opcode::Portability;
pub use opcode::OPCODE_ABI_ARTIFACT_VERSION;
pub use opcode::OPCODE_ABI_FINGERPRINT_V2;
pub use program::Chunk;
pub use program::CompiledFunction;
pub use program::Constant;
pub use program::LocalSlotInfo;
pub use program::ParamSlot;

Modules§

artifact
benchmark
Deterministic aggregation for benchmark receipts.
compiler
execution
opcode
Stable opcode vocabulary shared by every Harn execution target.
program
pure
Small authority-free primitives shared by native and portable runtimes.
type_contract
Runtime type-contract matching shared by native and portable execution.
value

Structs§

BuiltinId
Compact, deterministic identifier for a builtin name.

Constants§

KERNEL_VERSION
Version of the crate that owns portable artifact and execution semantics. Adapters use this value directly so benchmark provenance cannot drift to the version of whichever host happens to emit a receipt.
PORTABLE_MAX_GRANTS_JSON_BYTES
PORTABLE_MAX_PACKAGE_BYTES
PORTABLE_MAX_PACKAGE_MODULES
PORTABLE_MAX_SOURCE_BYTES
Shared adapter ingress limits. Native and browser hosts enforce these before allocating or parsing untrusted wire inputs.
PORTABLE_MAX_VALUE_JSON_BYTES

Functions§

compile_source
Compile a checked source module with deterministic options.
compile_source_named