convez.ai
MCP Server
Wolfe-Jam

faf-crate

Wolfe-Jam/faf-crate

Ver no GitHub
BomPluginScore · de 0 a 100

Persistent Project Context for Rust — IANA-registered .faf format · cargo add faf meta-crate

Instalação

$npx convez-ai Wolfe-Jam/faf-crate

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
71%
Último commit
há 2 semanas
Versão
—
Issues abertas
0
Contribuidores
1

README

A tradução para o português deste README ainda está na fila.

faf

Persistent Project Context for Rust. cargo add faf and you're in.

FAF defines. MD instructs. AI codes.

One crate, full ecosystem. Parse, validate, compile, and broadcast .faf files in Rust.

FAF (Foundational AI-context Format) is the IANA-registered format for persistent AI project context (application/vnd.faf+yaml). This meta-crate re-exports everything you need.

Install

cargo add faf

With Radio Protocol + Axum middleware:

cargo add faf --features radio,axum

Quick Start

use faf::{parse, binary};

let yaml = std::fs::read_to_string("project.faf")?;

// Parse
let doc = parse(&yaml)?;
println!("{} — {}% AI-ready", doc.project_name(), doc.score().unwrap_or(0));

// Compile to FAFb binary
let fafb = binary::compile(&yaml)?;
println!("{} bytes YAML → {} bytes FAFb", yaml.len(), fafb.len());

Feature Flags

FeatureDefaultCrateWhat you get
sdkyesfaf-rust-sdkParse, validate, compile, FAFb binary format
radionofaf-radio-rustRadio Protocol — broadcast AI context via WebSocket
axumnofaf-rust-sdk/axumFafContext extractor + FafLayer middleware

Radio Protocol

Broadcast AI context once, every tool receives:

use faf::faf_radio_rust::{RadioClient, RadioConfig};

let mut client = RadioClient::new(RadioConfig::grok());
client.connect().await?;
client.tune(vec!["91.0".into()]).await?;

// Broadcast metadata on a frequency
client.broadcast("91.0", serde_json::json!({
    "type": "fafb",
    "project": "my-app",
    "size": 220,
})).await?;

Axum Middleware

Inject .faf project context into every request:

use faf::{FafLayer, FafContext};

let app = Router::new()
    .route("/", get(handler))
    .layer(FafLayer::discover());

async fn handler(faf: FafContext) -> String {
    format!("Project: {}", faf.project_name())
}

Ecosystem

CrateVersionWhat
faf0.3.0This meta-crate
faf-rust-sdk1.3.0Core SDK — parse, validate, compile, FAFb
faf-radio-rust0.2.0Radio Protocol client
rust-faf-mcp0.1.0MCP server for .faf

Also available in TypeScript, Python, and Zig.

If faf has been useful, consider starring the repo — it helps others find it.

Links

License

MIT


Built by Wolfe James | faf.one

Ver o original no GitHub

Bom para

Relacionados