frame-cli 0.2.0

CLI for Frame — frame new scaffolds a complete Frame application: Rust composition host, Gleam component, and a connected browser page served by one binary
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gleam/erlang/process.{type Pid}

@external(erlang, "{{GLEAM_NAME}}_ffi", "loop")
fn actor_loop(supervisor: Pid, state: Int) -> Nil

/// Starts the component actor. The FFI is only the raw receive primitive;
/// this Gleam module owns the component entrypoint and message contract.
pub fn run(supervisor: Pid) -> Nil {
  actor_loop(supervisor, 0)
}

/// The entity command used by the host adapter and actor.
pub fn entity_message() -> Int {
  7
}