Native desktop GUIs from Elixir, powered by iced.
Quick start
{:ok, pid} = Plushie.start_link(MyApp)Dev mode (live code reloading)
# In config/dev.exs:
config :plushie, code_reloader: true
# Or as a start_link option:
{:ok, pid} = Plushie.start_link(MyApp, code_reloader: true)Under a supervisor
children = [
{Plushie, app: MyApp}
]Options
:app-- (required) the app module implementingPlushie.App:app_opts-- opts forwarded toapp.init/1(default:[]):binary-- path to the plushie binary (default: auto-resolved):name-- supervisor registration name (default:Plushie):daemon-- iftrue, keep running after the last window closes(default: `false`). In daemon mode, `all_windows_closed` is delivered to `update/2` instead of triggering shutdown.:code_reloader-- enable dev-mode live reloading.false(default),`true`, or a keyword list of reloader options (`:debounce_ms`, `:rebuild_artifacts`). Can also be set via `config :plushie, code_reloader: true`.:transport--:spawn(default, spawns the renderer as a childprocess), `:stdio` (reads/writes the BEAM's own stdin/stdout, for use with `plushie --exec`), or `{:iostream, pid}` (custom transport via iostream adapter -- see `Plushie.Bridge` for the protocol):format-- wire format,:msgpack(default) or:json:log_level-- plushie binary log level (:off,:error,:warning,:info,:debug).Default: `:error`.:renderer_args-- extra CLI args passed to the renderer process
When :transport is :stdio or {:iostream, pid}, the :binary
option is ignored (no renderer subprocess is spawned).
Summary
Functions
Returns the registered name of the bridge for the given instance.
Child spec for embedding Plushie under an existing supervisor.
Returns the registered name of the runtime for the given instance.
Starts a Plushie application under a supervisor linked to the calling process.
Stops a running Plushie supervisor.
Functions
Returns the registered name of the bridge for the given instance.
@spec child_spec(keyword()) :: Supervisor.child_spec()
Child spec for embedding Plushie under an existing supervisor.
Example
children = [
{Plushie, app: MyApp, name: :my_app_gui}
]
Returns the registered name of the runtime for the given instance.
@spec start_link( module(), keyword() ) :: Supervisor.on_start()
Starts a Plushie application under a supervisor linked to the calling process.
Returns {:ok, pid} on success.
Stops a running Plushie supervisor.
Accepts a pid or the instance name passed as :name to start_link/2
(defaults to Plushie, matching the default registration).