refactor(ipc): generate bindings with Specta

This commit is contained in:
Tunglies
2026-10-08 01:57:25 +08:00
parent 1c2817023e
commit 2e439b5e1a
71 changed files with 2091 additions and 1087 deletions
+6 -7
View File
@@ -1,8 +1,7 @@
//! Prints the frontend wire contract as JSON to stdout. Zero new dependencies:
//! the payload is derived from the same serializers the app uses at runtime.
//! Consumed by scripts/gen-contract.mjs; CI regenerates and diffs the committed
//! TypeScript artifact.
fn main() {
println!("{}", app_lib::frontend_wire_contract());
fn main() -> Result<(), Box<dyn std::error::Error>> {
app_lib::ipc::builder().export(
specta_typescript::Typescript::default(),
std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../src/services/bindings.ts"),
)?;
Ok(())
}