Skip to main content

Module runtime

Module runtime 

Source
Expand description

Runtime JIT backend: O(1) compiled-function lookup with background compilation.

  • Startup AOT preload from ArtifactStore::load_all into an immutable in-memory map.
  • O(1) JitBackend::lookup that only reads the resident map.
  • Fire-and-forget lookup-observed events to the backend thread.
  • Background JIT compilation for hot keys (threshold-based promotion).

ModulesΒ§

api πŸ”’
Public types and handle methods.
backend πŸ”’
config πŸ”’
Runtime configuration.
stats πŸ”’
Runtime statistics.
storage πŸ”’
Artifact storage trait and data model.
worker πŸ”’
Background JIT and AOT compilation workers.

StructsΒ§

AotRequest
Request to prepare an AOT artifact.
ArtifactKey
Full artifact identity for persisted artifacts.
ArtifactManifest
Metadata for a stored artifact.
BackendInner πŸ”’
Inner state for JitBackend. Owns the backend thread lifecycle.
BackendShared πŸ”’
State shared between JitBackend (via BackendInner) and the backend thread.
BackendThread πŸ”’
Backend thread handle and its completion signal.
CompilationEvent
Event emitted after a compilation attempt completes.
CompiledProgram
A compiled EVM program kept alive in the resident map.
JitBackend
JIT compilation backend with O(1) compiled-function lookup.
LazySpawnState πŸ”’
State kept around for lazily spawning the backend thread.
LookupRequest
Request to look up a compiled function.
RuntimeArtifactStore
In-memory artifact index backed by dylib files in a temporary directory.
RuntimeCacheKey
Runtime cache key: the minimal identity for a compiled program at runtime.
RuntimeConfig
Runtime configuration.
RuntimeStatsSnapshot
A point-in-time snapshot of runtime stats.
RuntimeTuning
Tuning knobs for the runtime.
StoredArtifact
A stored artifact consisting of a manifest and a path to the compiled dylib.

EnumsΒ§

BackendSelection
Backend selection for compilation.
CompilationKind
The kind of compilation that was performed.
InterpretReason
Reason why the runtime returned β€œinterpret” instead of a compiled function.
LookupDecision
Result of a lookup.
ProgramKind
Whether this program was compiled AOT or JIT.

TraitsΒ§

ArtifactStore
Trait for loading and storing compiled artifacts.