Skip to main content

Crate faf_rust_sdk

Crate faf_rust_sdk 

Source
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§

ContextQuality
Context quality metrics
FafData
Complete FAF file structure
FafFile
Parsed FAF file with convenient accessors
HumanContext
Human context - the 6 W’s
InstantContext
Instant context for AI
Preferences
Development preferences
Project
Project metadata
Stack
Technical stack
State
Project state
ValidationResult
Validation result

Enums§

CompressionLevel
Compression levels
FafError
FAF parsing errors
FindError
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