Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

End-To-End Workflows

This chapter ties the separate surfaces together into practical workflows.

Workflow 1: Analyze A Source Contract And Save JSON

#![allow(unused)]
fn main() {
use linc::{analyze_source_package, SourcePackage};

let analysis = analyze_source_package(&SourcePackage::default());
let json = serde_json::to_string_pretty(&analysis).unwrap();
std::fs::write("link-analysis.json", json).unwrap();
}

Workflow 2: Translate PARC Artifacts In Tests Or Harnesses

The intended cross-package architecture is artifact-based, not shared-type based. Library code should not import parc; translation belongs in tests, examples, or external harnesses.

Workflow 3: Inspect A Native Artifact

#![allow(unused)]
fn main() {
use linc::inspect_symbols;

let inventory = inspect_symbols("build/libdemo.so")?;
let json = serde_json::to_string_pretty(&inventory).unwrap();
std::fs::write("symbols.json", json).unwrap();
}

Workflow 4: Validate Source-Derived Bindings Against Artifacts

Validation currently compares a BindingPackage against one or more inventories. That lower-level path is still part of the crate surface, even if the preferred intake story starts from SourcePackage.

Use analysis.declared_link_surface and analysis.resolved_link_plan when a downstream tool only wants link names, artifact inputs, framework inputs, platform constraints, or ordering metadata.

Workflow 6: Downstream fol / gerc Consumption

  1. parc produces a source artifact
  2. tests/examples/harnesses translate that artifact into linc input
  3. linc produces LinkAnalysisPackage
  4. downstream generation reads source and link analysis in parallel

Workflow 7: Repo-Local Bootstrap

The raw-header bootstrap path exists for difficult fixtures and repository self-hosting. It is public, tested, and useful. It is just not the package boundary that new downstream tools should center first.

Workflow 8: ABI-Sensitive Packages

For packages with important struct ABI, attach layout evidence, inspect symbols, and validate before generation.

This is the right pattern when a downstream generator wants stronger evidence without turning LINC into the generator itself.