feat(sdk)!: drop the #[fai_module] alias — #[chain_module] only
Some checks failed
CI / Linux x86_64 (Forgejo) (push) Failing after 1s
Some checks failed
CI / Linux x86_64 (Forgejo) (push) Failing after 1s
No module outside this workspace was ever published against the alias (the system has no external users yet), so the pre-rename name goes away instead of being maintained: one attribute, no legacy surface. All internal doc references swept; echo example description moves to the product name. 0.3.0. Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
parent
4b4de3374c
commit
a4415ada7e
13 changed files with 17 additions and 31 deletions
|
|
@ -1,7 +1,7 @@
|
|||
//! Invocation context passed to a module on every call.
|
||||
//!
|
||||
//! Mirrors the WIT `invocation-context` record. The
|
||||
//! `#[fai_module]` macro builds this from the WIT-generated value
|
||||
//! `#[chain_module]` macro builds this from the WIT-generated value
|
||||
//! before handing it to user code.
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//! Host-callback plumbing for `Context::emit` (WIT 1.1 `emit-event`).
|
||||
//!
|
||||
//! The WIT host imports (`emit-event`) are only reachable from the
|
||||
//! `wit_bindgen`-generated glue inside the `#[fai_module]` expansion,
|
||||
//! `wit_bindgen`-generated glue inside the `#[chain_module]` expansion,
|
||||
//! which lives in the module crate — not here. So the macro installs a
|
||||
//! function pointer that reaches the real host import, and
|
||||
//! [`Context::emit`](crate::Context::emit) calls it through this hook.
|
||||
|
|
@ -18,7 +18,7 @@ thread_local! {
|
|||
static EMIT_HOOK: Cell<Option<fn(&str, Payload)>> = const { Cell::new(None) };
|
||||
}
|
||||
|
||||
/// Install the emit hook. Called by the `#[fai_module]` expansion at
|
||||
/// Install the emit hook. Called by the `#[chain_module]` expansion at
|
||||
/// the start of each invocation. Not part of the stable public API.
|
||||
#[doc(hidden)]
|
||||
pub fn __set_emit_hook(f: fn(&str, Payload)) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ pub struct Inputs {
|
|||
|
||||
impl Inputs {
|
||||
/// Build directly from a list of `(name, payload)` pairs.
|
||||
/// Used by the `#[fai_module]` macro after WIT conversion.
|
||||
/// Used by the `#[chain_module]` macro after WIT conversion.
|
||||
#[doc(hidden)]
|
||||
pub fn __from_pairs(items: Vec<(String, Payload)>) -> Self {
|
||||
Self { items }
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ pub use inputs::Inputs;
|
|||
pub use outputs::Outputs;
|
||||
pub use payload::{BytesValue, FileRef, Payload};
|
||||
|
||||
pub use chain_module_sdk_macros::{chain_module, fai_module};
|
||||
pub use chain_module_sdk_macros::chain_module;
|
||||
|
||||
// Emit-hook plumbing used by the `#[chain_module]` expansion (wasm32)
|
||||
// so `Context::emit` reaches the WIT `emit-event` host import.
|
||||
|
|
@ -49,7 +49,6 @@ pub(crate) use host::emit;
|
|||
pub mod prelude {
|
||||
pub use super::{
|
||||
BytesValue, Context, FileRef, Inputs, ModuleError, Outputs, Payload, chain_module,
|
||||
fai_module,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ impl Outputs {
|
|||
}
|
||||
|
||||
/// Consume the builder into the underlying `(name, payload)` list.
|
||||
/// Used by the `#[fai_module]` macro after WIT conversion.
|
||||
/// Used by the `#[chain_module]` macro after WIT conversion.
|
||||
#[doc(hidden)]
|
||||
pub fn __into_pairs(self) -> Vec<(String, Payload)> {
|
||||
self.items
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
//!
|
||||
//! The shape is fixed by the v1.0 WIT freeze. Field-by-field
|
||||
//! conversion to and from the WIT-generated type happens inside
|
||||
//! the `#[fai_module]` macro expansion in the user crate.
|
||||
//! the `#[chain_module]` macro expansion in the user crate.
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue