#[act_component]Expand description
Attribute macro for ACT component modules.
Transforms a module containing #[act_tool] functions into a complete
WIT component implementation with wit_bindgen::generate!(), export!(),
and a Guest trait implementation.
§Attributes
name = "..."(required) — Component nameversion = "..."(required) — Component versiondescription = "..."(required) — Component descriptiondefault_language = "..."(optional, defaults to “en”) — BCP 47 language tag
§Example
ⓘ
#[act_component(
name = "my-component",
version = "0.1.0",
description = "My ACT component",
)]
mod component {
use super::*;
#[act_tool(description = "Say hello")]
fn greet(args: GreetArgs) -> ActResult<String> {
Ok(format!("Hello, {}!", args.name))
}
}