Expand description
Core’s side of the protocol: spawn a plugin, negotiate a version, send requests.
Frames are read on a background thread so core can time out a silent plugin during the handshake and never blocks forever on a plugin that has died. stderr is drained on another thread, forwarded to a log sink and kept (last lines) for error messages.
Structs§
Enums§
Constants§
- DEFAULT_
HANDSHAKE_ TIMEOUT - INTERACTIVE_
ENV - Set to
1in a plugin’s environment when a person is at core’s terminal, else0.
Functions§
- set_
core_ version - Set the DRE version sent to plugins in the handshake (
core_version). This crate is versioned on its own, so the host names the version of DRE it’s part of; unset, it’s “unreleased”. - stderr_
log - A log sink that prefixes each plugin line with the plugin’s file name, on core’s stderr.