feat(sdk): rename attribute to #[chain_module], keep #[fai_module] alias
Some checks failed
CI / Linux x86_64 (Forgejo) (push) Failing after 2s

The public macro name was the last product-scoped 'fai' identifier
in the SDK surface. #[chain_module] is now the primary attribute
(README + examples updated); #[fai_module] stays as a delegating
alias so modules written before the rename keep compiling. 0.2.1.

Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
flemming-it 2026-07-11 19:02:40 +02:00
parent 40f3dbd885
commit 4b4de3374c
9 changed files with 33 additions and 19 deletions

View file

@ -1,13 +1,13 @@
//! Minimum-viable F∆I module — echoes the first text input.
//!
//! Demonstrates the entire authoring surface: a single function
//! decorated with `#[fai_module]`. No `wit_bindgen`, no
//! decorated with `#[chain_module]`. No `wit_bindgen`, no
//! `unsafe_op_in_unsafe_fn` allow, no `export!` call, no manual
//! Payload-variant matching.
use chain_module_sdk::prelude::*;
#[fai_module]
#[chain_module]
fn invoke(_ctx: Context, inputs: Inputs) -> Result<Outputs, ModuleError> {
let text = inputs.require_text("input")?;
Ok(Outputs::new().with_text("output", format!("echo: {text}")))