Expand description
DX Binary Output (.sr) Module
Handles binary serialization output with proper path hashing
for the .dx/serializer folder structure.
§Path Hashing Strategy
Files with the same name in different directories get unique subfolders:
project/
config.dx -> .dx/serializer/config.sr
src/config.dx -> .dx/serializer/src/config.sr
lib/config.dx -> .dx/serializer/lib/config.srThe hash is derived from the relative path to ensure deterministic output.
Structs§
- Binary
Config - Binary output configuration
Functions§
- clean_
stale - Clean stale binary files (where source no longer exists)
- get_
binary_ path - Get the output path for a .sr file
- get_
manifest - Get manifest of all .dx files in a project
- hash_
path - Compute hash for a file path (8 hex characters)
- is_
cache_ valid - Check if binary cache exists and is newer than source
- read_
binary - Read binary data from .dx file
- write_
binary - Write binary data to the correct .dx path