fluau

Sandboxed Luau plugins for Flutter. Plugins draw from a host-owned UI catalog, talk to the app through gated host services, and can expose typed capabilities back to Dart.

Full monorepo docs (example walkthrough, architecture): see the repository Getting started.

Prerequisite: a Flutter–Rust bridge

fluau runs Luau in Rust. A Flutter↔Rust bridge is required. This package does not create one for you.

Use flutter_rust_bridge (the example pins 2.13.0) or another bridge you already maintain. Follow FRB’s own docs to bootstrap an app from zero; then come back here to add fluau.

You also need the Rust runtime crate fluau on crates.io (and typically fluau_codegen on pub.dev for UI/capability generation).

Install

dependencies:
  fluau: ^0.1.14

Also depend on the Rust crate fluau (default features for runtime; stub-gen in build-dependencies). Use fluau_codegen to regenerate UI/capability bindings.

Agent skills

After depending on fluau, install the packaged Agent Skills into your app:

dart run skills@ get

Use --all to pull skills from every dependency that ships them. Skills land under .agents/skills/ (for example fluau-getting-started, fluau-integrate-host).

Bootstrap and bind

After FRB works in your app, stamp glue (fluau.yaml is optional; add one to override stamp paths):

dart run fluau:bootstrap
flutter_rust_bridge_codegen generate
# optional: dart run fluau:bootstrap --generate-frb

Then:

WidgetsFlutterBinding.ensureInitialized();
await RustLib.init(); // runs #[frb(init)] → fluau::setup on the Rust side
LuaPluginBridge.bind(FrbLuaPluginBridge()); // stamped lib/fluau/fluau_bridge.g.dart
await PluginRegistryLoader.registerPackages([...]);
// LuaPlugin(pluginId: '...', buildWidget: LuaWidgetRegistry.buildFromMap, ...)

Pass your UI catalog into LuaPlugin / LuaPluginView via buildWidget — this package does not ship default widgets. See fluau.yaml, UI catalog, and plugin permissions.

What this package provides

  • LuaPluginBridge + dart run fluau:bootstrap
  • Package YAML loader, permission sheet helpers, PluginGrantStore
  • Annotations (@LuaWidget, @LuaCapability, …) and session host widgets
  • @LuaWidget annotations — host owns the Flutter Widget catalog

License

MIT

Libraries

fluau
Sandboxed Luau plugins for Flutter: bridge, grants, package loader, annotations.