libero/cli/templates
Template strings for libero new scaffolding.
Each function returns a file’s content as a String. The generated files give a new project a minimal skeleton to build from.
Values
pub fn client_gleam_toml(
name name: String,
target target: String,
root_package root_package: String,
) -> String
Returns a gleam.toml for a client package.
pub fn gleam_toml(name name: String) -> String
Returns gleam.toml content for a new project (the server package). Libero config lives under the [tools.libero] section.
pub fn shared_gleam_toml() -> String
Returns gleam.toml content for the shared package. Target-agnostic so both the Erlang server and JS clients can import messages and types from it.
pub fn starter_messages() -> String
Returns a skeleton messages module.
Defines the typed RPC boundary between client and server. Add your message types here — libero scans for MsgFromClient and MsgFromServer to generate dispatch and client stubs.
pub fn starter_shared_state() -> String
Returns a skeleton SharedState module.
pub fn starter_spa(name name: String) -> String
Returns a starter Lustre SPA app module.
pub fn starter_test() -> String
Returns a skeleton test that verifies the handler works.