OpenVCS Core (openvcs-core)
Shared Rust crate for:
- OpenVCS plugins (JSON-RPC over stdio)
- The OpenVCS client/host (shared models + backend trait surface)
Cargo features
plugin-protocol(default): JSON-RPC wire types + plugin helper modules:openvcs_core::plugin_protocol(PluginMessage,RpcRequest,RpcResponse)openvcs_core::plugin_stdio(read/write helpers,respond_shared, host calls)openvcs_core::plugin_runtime(simple request dispatch loop + handler registry)openvcs_core::events(host event subscribe/emit helpers)openvcs_core::host(bridge for calling the host over stdio)
vcs: the backend trait surface:openvcs_core::Vcs,openvcs_core::VcsError,openvcs_core::Resultopenvcs_core::models(shared request/response/event types)- enables
backend-registry
backend-registry: link-time backend discovery viaopenvcs_core::backend_descriptor::BACKENDS- intended to be enabled together with
vcs - on
wasm32, the registry is always empty (nolinkmesupport)
- intended to be enabled together with
Plugin quickstart (stdio JSON-RPC)
Register one or more RPC handlers and run the dispatch loop:
use ;
use ok;
Notes:
openvcs_core::{trace, debug, info, warn, error}forward logs to the OpenVCS host when available (and also emit normallogrecords).- Host calls from plugins go through
openvcs_core::host::call(...)(the runtime initializes the host bridge for stdio). OPENVCS_PLUGIN_HOST_TIMEOUT_MScontrols host call timeouts (default: 60000ms).
Development
Common checks (matches CI):
just fix(runs rustfmt + clippy)cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo check --all-targets --all-featurescargo testcargo test --no-default-features --features plugin-protocol,vcs,backend-registrycargo package
License
GPL-3.0-or-later (see LICENSE).