Finds a platform runtime containing the native launcher, WebAssembly emulators and guest file system.
load!/1 checks the host platform and protocol version, then loads the
manifest and launch/ files. Install the matching runtime with
mix kettlecorn.install; Python and the Wasmtime CLI are not required.
dir/1 checks the :runtime option, $KETTLECORN_RUNTIME,
config :kettlecorn, :runtime, then installed_dir/0.
With Nix, nix build .#runtime builds the runtime.
The manifest records kettlecorn, protocol, platform, otp, elixir,
component imports, and tested_with.wasmtime. The bundled launcher embeds
that Wasmtime version. launch/ defines the guest's arguments and environment.
Summary
Functions
The bundled script CLI for this runtime.
The runtime directory to use (see the module docs), or nil when there is
none.
The bundled native launcher for this runtime.
Finds and loads a runtime using the discovery order of dir/1.
Where Kettlecorn.Install.runtime/1 puts this version's runtime,
under the user cache directory.
Loads one generation of the runtime in dir, resolving its publication link.
Requires its manifest, executable launcher and CLI, launch/ files, emulators and
root/. Checks the host platform and the library's protocol version.
Both executables are required even when using only the host API.
Raises if the runtime is incomplete or incompatible.
The protocol version required by the library.
The library's version, which is the version of the runtime it installs.
Types
@type t() :: %Kettlecorn.Runtime{ dir: Path.t(), manifest: Kettlecorn.Runtime.Manifest.t() }
Functions
The bundled script CLI for this runtime.
The runtime directory to use (see the module docs), or nil when there is
none.
The bundled native launcher for this runtime.
Finds and loads a runtime using the discovery order of dir/1.
@spec installed_dir() :: Path.t()
Where Kettlecorn.Install.runtime/1 puts this version's runtime,
under the user cache directory.
Like load!/1, but returns {:ok, runtime} or {:error, message}.
Loads one generation of the runtime in dir, resolving its publication link.
Requires its manifest, executable launcher and CLI, launch/ files, emulators and
root/. Checks the host platform and the library's protocol version.
Both executables are required even when using only the host API.
Raises if the runtime is incomplete or incompatible.
@spec protocol_version() :: pos_integer()
The protocol version required by the library.
@spec version() :: String.t()
The library's version, which is the version of the runtime it installs.