F module - Ollama-backed text translation between supported languages.
Find a file
flemming-it d356d3584b
Some checks failed
CI / Linux x86_64 (Forgejo) (push) Failing after 2s
ci: sign release bundles with FAI_SIGNING_KEY
Drop-in from fai/platform .forgejo/workflow-templates/
sign-bundle-keypair.yml. Triggers on v*.*.* tag push: builds
wasm32-wasip2, fetches the fai CLI from get.fai.flemming.ai,
packs the bundle, ECDSA P-256 signs it against the org-level
Forgejo secret FAI_SIGNING_KEY, round-trip-verifies against
infra/cosign/official.pub on fai/platform main, and attaches
bundle + .sig to the Forgejo Release via the API.

Signed-off-by: flemming-it <sf@flemming.it>
2026-05-28 23:15:19 +02:00
.forgejo/workflows ci: sign release bundles with FAI_SIGNING_KEY 2026-05-28 23:15:19 +02:00
src feat: initial text-translate v0.1.0 (text.translate@0.1.0) 2026-05-04 10:53:10 +02:00
.gitignore feat: initial text-translate v0.1.0 (text.translate@0.1.0) 2026-05-04 10:53:10 +02:00
Cargo.lock feat: initial text-translate v0.1.0 (text.translate@0.1.0) 2026-05-04 10:53:10 +02:00
Cargo.toml chore: SDK URL → git.flemming.ai/fai/module-sdk-rust 2026-05-26 13:16:53 +02:00
LICENSE feat: initial text-translate v0.1.0 (text.translate@0.1.0) 2026-05-04 10:53:10 +02:00
MODULE.de.md docs: add MODULE.md + MODULE.de.md inline docs 2026-05-25 14:06:04 +02:00
MODULE.md docs: add MODULE.md + MODULE.de.md inline docs 2026-05-25 14:06:04 +02:00
module.yaml chore(module): schema_version 2 + explicit provider 2026-05-28 11:48:25 +02:00
NOTICE feat: initial text-translate v0.1.0 (text.translate@0.1.0) 2026-05-04 10:53:10 +02:00
README.md feat: initial text-translate v0.1.0 (text.translate@0.1.0) 2026-05-04 10:53:10 +02:00
rust-toolchain.toml feat: initial text-translate v0.1.0 (text.translate@0.1.0) 2026-05-04 10:53:10 +02:00

text-translate

Provides the text.translate capability for F∆I Platform.

Build

cargo build --release --target wasm32-wasip2

Test

cargo test                 # host-side unit + integration tests
fai test .                 # load the wasm component in the runtime sandbox

Authoring with fai-module-sdk

The module body is one decorated function:

#[fai_module]
pub fn invoke(_ctx: Context, inputs: Inputs) -> Result<Outputs, ModuleError> {
    let message = inputs.require_text("message")?;
    Ok(Outputs::new().with_text("reply", format!("got: {message}")))
}

The macro hides the wit_bindgen call, the Guest impl, the Payload variant matching, and the wit_bindgen::export! invocation. See fai-module-sdk documentation for the full surface.

SDK source

The Cargo.toml git-deps fai-module-sdk from https://git.flemming.ws/fai/module-sdk.git. If your environment requires authentication for that host (e.g. Forgejo with REQUIRE_SIGNIN_VIEW=true), set up git config insteadOf with your PAT, or use cargo:net.git-fetch-with-cli=true plus a credential helper.

License

Apache-2.0