Expand description
§RunMat Snapshot Creator
High-performance snapshot system for preloading the RunMat standard library. Inspired by V8’s snapshot architecture, this provides:
- Zero-copy serialization with memory mapping
- Multi-tier compression with LZ4 and ZSTD
- Integrity validation with SHA-256 checksums
- Concurrent loading with lock-free data structures
- Progressive enhancement with fallback mechanisms
§Architecture
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Standard Lib │ -> │ Snapshot │ -> │ Runtime │
│ Components │ │ Generator │ │ Loader │
│ │ │ │ │ │
│ • Builtins │ │ • Serialization │ │ • Memory Map │
│ • HIR Cache │ │ • Compression │ │ • Validation │
│ • Bytecode │ │ • Validation │ │ • Integration │
│ • GC Presets │ │ • Optimization │ │ • Performance │
└─────────────────┘ └──────────────────┘ └─────────────────┘Re-exports§
pub use builder::SnapshotBuilder;pub use format::SnapshotFormat;pub use format::SnapshotHeader;pub use format::SnapshotMetadata;pub use loader::SnapshotLoader;
Modules§
- builder
- Snapshot builder for creating optimized snapshots of the standard library
- compression
- High-performance compression for snapshot data
- format
- Snapshot file format and serialization
- loader
- High-performance snapshot loader with memory mapping and caching
- presets
- Snapshot presets for common use cases
- validation
- Snapshot validation and integrity checking
Structs§
- Builtin
Metadata - Metadata for a builtin function
- Builtin
Registry - Optimized builtin function registry for fast dispatch
- Bytecode
Cache - Precompiled bytecode cache
- Bytecode
Sequence - Bytecode sequence for common operations
- Execution
Hint - Execution pattern hint
- GcPerformance
Profile - GC performance profile
- GcPreset
Cache - GC configuration presets
- HirCache
- Cached HIR representations
- HirPattern
- HIR pattern for common expressions
- Hotspot
Bytecode - Hotspot bytecode with JIT compilation hints
- JitHint
- JIT compilation hint
- Loading
Stats - Snapshot loading statistics
- Memory
Hint - Memory layout optimization hint
- Optimization
Hint - Optimization hint for hotspot bytecode
- Optimization
Hints - Runtime optimization hints
- Snapshot
- Core snapshot data containing preloaded standard library components
- Snapshot
Config - Snapshot configuration
- Snapshot
Manager - Main snapshot interface
Enums§
- Builtin
Arity - Function arity specification
- Builtin
Category - Builtin function categories for optimization
- Cache
Eviction Policy - Cache eviction policies
- Compression
Algorithm - Compression algorithm options
- Computational
Complexity - Computational complexity for scheduling hints
- Execution
Hint Type - Types of execution hints
- JitHint
Type - Types of JIT hints
- Memory
Hint Type - Types of memory hints
- Optimization
Level - Optimization level for JIT compilation hints
- Prefetch
Pattern - Memory prefetch patterns
- Snapshot
Error - Error types for snapshot operations
Type Aliases§
- Snapshot
Result - Result type for snapshot operations