The old 'F∆I Platform' product name and platform@flemming.ai contact survived in docs/NOTICE/descriptions/help text; the product is Ch∆In and the contact is chain@flemming.ai. Generic 'cross-platform/platform-native' left untouched. Signed-off-by: flemming-it <sf@flemming.it>
63 lines
1.9 KiB
TOML
63 lines
1.9 KiB
TOML
# fai-plugin-sdk
|
|
#
|
|
# Ergonomic wrapper around the WIT bindings declared in
|
|
# `wit/studio-plugin.wit`. Studio plugins depend on this crate
|
|
# rather than dealing with raw wit-bindgen output. v0.1 ships
|
|
# WITHOUT the `#[plugin(...)]` proc-macro: plugins write the
|
|
# `export!()` invocation themselves with the structs the SDK
|
|
# provides. The macro lands in v0.2 once the contract is
|
|
# stable enough.
|
|
#
|
|
# Naming: this is the Rust SDK for building plugins. Sister
|
|
# crates per the SDK-family convention in
|
|
# `docs/architecture/sdks.md`:
|
|
# - fai-module-sdk (Rust) — flow modules
|
|
# - fai-plugin-sdk (Rust) — Studio plugins ← this crate
|
|
# - fai-client-sdk (Dart) — clients talking to the hub
|
|
# Each gets a language-suffix on the dir / repo
|
|
# (fai_plugin_sdk_rust / git.flemming.ai/fai/plugin-sdk-rust)
|
|
# so polyglot variants can be added later without renaming.
|
|
#
|
|
# Build a plugin:
|
|
#
|
|
# cargo build --release --target wasm32-wasip2
|
|
#
|
|
# Use:
|
|
#
|
|
# use fai_plugin_sdk::{export_plugin, bindings};
|
|
#
|
|
# struct MyTheme;
|
|
# impl bindings::exports::chain::studio_plugin::theme::Guest for MyTheme {
|
|
# fn theme_for(brightness: String) -> Result<_, _> { ... }
|
|
# }
|
|
#
|
|
# export_plugin!(MyTheme);
|
|
|
|
[package]
|
|
name = "fai-plugin-sdk"
|
|
version = "0.1.0"
|
|
# edition 2021 for now — wit-bindgen 0.36 emits the older
|
|
# `#[link_section]` / `unsafe`-attribute syntax that the
|
|
# edition-2024 compiler rejects. Bump to 2024 when moving
|
|
# to a wit-bindgen version with edition-2024-compatible
|
|
# codegen.
|
|
edition = "2021"
|
|
authors = ["Dr. Stefan Flemming <chain@flemming.ai>"]
|
|
license = "Apache-2.0"
|
|
publish = false
|
|
description = "F∆I Plugin SDK (Rust) — wrapper for the studio-plugin WIT"
|
|
repository = "https://git.flemming.ai/fai/plugin-sdk-rust"
|
|
rust-version = "1.85"
|
|
|
|
[lib]
|
|
crate-type = ["rlib"]
|
|
|
|
[dependencies]
|
|
wit-bindgen = "0.36"
|
|
|
|
[package.metadata.component]
|
|
package = "chain:studio-plugin-sdk"
|
|
|
|
[package.metadata.component.target]
|
|
path = "wit"
|
|
world = "studio-plugin"
|