Skip to main content

Crate synx_core

Crate synx_core 

Source
Expand description

§SYNX Core — The Active Data Format

High-performance SYNX parser with full !active engine support. Single Rust crate powering all language bindings.

use synx_core::{Synx, Value};

let data = Synx::parse("name Wario\nage 30\nactive true");
assert_eq!(data["name"], Value::String("Wario".into()));
assert_eq!(data["age"], Value::Int(30));

Re-exports§

pub use diff::diff as diff_objects;
pub use diff::DiffResult;
pub use diff::DiffChange;
pub use diff::diff_to_value;

Modules§

binary
SYNX Binary Format (.synxb) — compact binary serialization with string interning.
diff
Structural diff between two SYNX values.

Structs§

Constraints
Constraints from [min:3, max:30, required, type:int].
IncludeDirective
Include directive: !include path [alias]
Meta
Metadata for a single key (markers, args, constraints).
Options
Options for active mode resolution.
ParseResult
Full parse result with metadata.
Synx
Main entry point for the SYNX parser.

Enums§

Mode
File mode.
Value
SYNX value types.

Functions§

parse
Parse a SYNX text string into a value tree with metadata.
reshape_tool_output
Reshape parsed tree for !tool mode.
resolve
Resolve all active-mode markers in a ParseResult. Returns the resolved root Value.
safe_calc
Safely evaluate an arithmetic expression. All variable references must be substituted with numbers before calling this.
to_json
Convert a Value to a JSON string.
write_json
Write a Value as JSON string (for FFI output).

Type Aliases§

MetaMap
Map of key → metadata for one object level.