From a5da67d0a378a351faa6752f323409e1cb28f1b2 Mon Sep 17 00:00:00 2001 From: flemming-it Date: Mon, 15 Jun 2026 22:17:28 +0200 Subject: [PATCH] refactor: rename WIT contract fai:platform->chain:platform Tracks the platform's WIT ABI rename. The module world package is now chain:platform@1.0.0; generated binding paths + accessor names follow. Modules built with this SDK now import chain:platform/host. SDK crate names stay fai-* (vendor namespace) for now. Signed-off-by: flemming-it --- README.md | 4 ++-- crates/fai-module-sdk-macros/src/lib.rs | 4 ++-- crates/fai-module-sdk/src/lib.rs | 2 +- wit/world.wit | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0f1d138..c5e05cc 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ That single function — plus a `Cargo.toml` listing ## Stability The SDK insulates module code from the underlying WIT contract -(`fai:platform`, frozen at v1.0 in the platform repo). The +(`chain:platform`, frozen at v1.0 in the platform repo). The WIT may evolve in additive minor versions or, eventually, a coordinated v2.0; the SDK absorbs that change so existing module code keeps compiling. @@ -47,7 +47,7 @@ two ever drift, CI fails. | Track | Stability | |-------|-----------| -| WIT contract (`fai:platform`) | Frozen at v1.0 in the platform repo | +| WIT contract (`chain:platform`) | Frozen at v1.0 in the platform repo | | `fai-module-sdk` Rust API | Semver; v0.x while ergonomics evolve | | Per-module versions | Each module repo's own concern | diff --git a/crates/fai-module-sdk-macros/src/lib.rs b/crates/fai-module-sdk-macros/src/lib.rs index d842ec4..6e21e8c 100644 --- a/crates/fai-module-sdk-macros/src/lib.rs +++ b/crates/fai-module-sdk-macros/src/lib.rs @@ -57,8 +57,8 @@ pub fn fai_module(_attrs: TokenStream, input: TokenStream) -> TokenStream { runtime_path: "::fai_module_sdk::__rt::wit_bindgen::rt", }); - use exports::fai::platform::invoke::Guest; - use fai::platform::types::{ + use exports::chain::platform::invoke::Guest; + use chain::platform::types::{ BytesValue as WitBytes, FileRef as WitFileRef, InvocationContext as WitContext, diff --git a/crates/fai-module-sdk/src/lib.rs b/crates/fai-module-sdk/src/lib.rs index ea7a01a..67862e1 100644 --- a/crates/fai-module-sdk/src/lib.rs +++ b/crates/fai-module-sdk/src/lib.rs @@ -19,7 +19,7 @@ //! # Stability //! //! This crate insulates modules from the underlying WIT contract -//! (`fai:platform`, frozen at v1.0). The WIT may evolve in additive +//! (`chain:platform`, frozen at v1.0). The WIT may evolve in additive //! minor versions or, eventually, a coordinated v2.0; the SDK absorbs //! that change so module code keeps compiling. diff --git a/wit/world.wit b/wit/world.wit index 9a40fbf..58ac024 100644 --- a/wit/world.wit +++ b/wit/world.wit @@ -24,7 +24,7 @@ // stable, ergonomic surface. That is what protects modules // from any future evolution of this contract. -package fai:platform@1.0.0; +package chain:platform@1.0.0; /// Types that flow between the host (hub) and modules. interface types {