elixirkit_next/README.md
ElixirKit helps running Elixir alongside native applications written in Rust.
š§ ElixirKit is experimental and subject to change without notice.
See examples:
examples/cli_example - Minimal CLI that communicates with Elixirexamples/tauri_example - Desktop app using Taurilet command = elixirkit::release(rel_dir, rel_name)
let exit_code = command.start(|(name, data)| {
match name {
"echo" => {
println!("Received: {data}");
}
_ => {}
}
});
elixirkit::release(rel_dir, rel_name) - create command for Elixir releaseelixirkit::Command::new(program, args) - create command for any executablecommand.current_dir(path) - set working directorycommand.env(&[("KEY", "value")]) - set environment variablescommand.start(handler) -> exit_code - start the command and run event loopcommand.send((name, data)) - send message to Elixir sideElixirKit.start_link() - start listener, messages from Rust will be delivered as {:event, name, data} tuplesElixirKit.publish(name, data) - send message to Rust side{:message, {name, data}} messages to match Rust side