| Crates.io | openvcs-core |
| lib.rs | openvcs-core |
| version | 0.1.5 |
| created_at | 2025-12-31 16:14:13.438153+00 |
| updated_at | 2026-01-07 23:47:33.465155+00 |
| description | Core types and traits for OpenVCS. |
| homepage | https://bbgames.dev/ |
| repository | https://github.com/Open-VCS/OpenVCS-Core |
| max_upload_size | |
| id | 2014950 |
| size | 110,104 |
openvcs-core)Shared Rust crate for:
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)backend-registrybackend-registry: link-time backend discovery via openvcs_core::backend_descriptor::BACKENDS
vcswasm32, the registry is always empty (no linkme support)Register one or more RPC handlers and run the dispatch loop:
use openvcs_core::plugin_runtime::{register_delegate, run_registered};
use openvcs_core::plugin_stdio::ok;
fn main() -> std::io::Result<()> {
register_delegate("ping", |_ctx, _req| ok(serde_json::json!({ "pong": true })));
run_registered()
}
Notes:
openvcs_core::{trace, debug, info, warn, error} forward logs to the OpenVCS host when available (and also emit normal log records).openvcs_core::host::call(...) (the runtime initializes the host bridge for stdio).OPENVCS_PLUGIN_HOST_TIMEOUT_MS controls host call timeouts (default: 60000ms).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 packageGPL-3.0-or-later (see LICENSE).