Skip to main content

Module binary_output

Module binary_output 

Source
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.sr

The hash is derived from the relative path to ensure deterministic output.

Structs§

BinaryConfig
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