Expand description
FAF Rust SDK - Foundational AI-context Format
Fast, zero-copy parser for FAF files optimized for inference workloads.
§Example
use faf_rust_sdk::{parse, FafFile};
let content = r#"
faf_version: 2.5.0
project:
name: my-project
goal: Build something great
"#;
let faf = parse(content).unwrap();
println!("Project: {}", faf.project_name());Re-exports§
pub use binary::FafbError;pub use binary::FafbHeader;pub use binary::Flags;pub use binary::Priority;pub use binary::SectionEntry;pub use binary::SectionTable;pub use binary::SectionType;
Modules§
- binary
- FAFB Binary Format
Structs§
- Context
Quality - Context quality metrics
- FafData
- Complete FAF file structure
- FafFile
- Parsed FAF file with convenient accessors
- Human
Context - Human context - the 6 W’s
- Instant
Context - Instant context for AI
- Preferences
- Development preferences
- Project
- Project metadata
- Stack
- Technical stack
- State
- Project state
- Validation
Result - Validation result
Enums§
- Compression
Level - Compression levels
- FafError
- FAF parsing errors
- Find
Error - Errors from find operations
Constants§
- VERSION
- Library version
Functions§
- compress
- Compress FAF to specified level
- estimate_
tokens - Get estimated token count for compression level
- find_
and_ parse - Find and parse FAF file in one call
- find_
faf_ file - Find FAF file starting from given directory, walking up to parents
- parse
- Parse FAF content from string
- parse_
file - Parse FAF from file path
- stringify
- Serialize FAF back to YAML string
- validate
- Validate FAF file structure