Skip to main content

Crate corsa_client

Crate corsa_client 

Source
Expand description

High-level client bindings for the Corsa stdio API.

This crate wraps the raw transports and endpoint naming used by Corsa behind typed request/response helpers. In practice it is the main entry point when you want to:

  • spawn a Corsa worker process
  • initialize it once and reuse the session
  • create and reuse snapshots
  • ask type, symbol, and syntax questions through strongly typed helpers
  • attach filesystem callbacks for overlay-like workflows

§Main Building Blocks

  • ApiClient manages a single worker process or pipe connection.
  • ApiSpawnConfig describes how that worker should be started.
  • ManagedSnapshot keeps snapshot handles alive and releases them on drop.
  • ApiProfile gives orchestrators a stable name for a spawn configuration.

§Performance Model

corsa does not try to out-compile Corsa itself. The win comes from session reuse, snapshot reuse, and cheaper transports such as sync msgpack. For docs and benchmarks around that trade-off, see the workspace guides.

Re-exports§

pub use api::*;

Modules§

api
Typed bindings for the Corsa stdio API surface. Typed request/response layer for the Corsa stdio API.
error
Re-exports shared error types used by the client APIs.
jsonrpc
Re-exports low-level JSON-RPC helpers used by the stdio client transport.
lsp_types
Re-exports shared LSP model types used by editor-style API responses.
observability
Re-exports structured operational events used by the client configs.
process
Re-exports process-spawning primitives used to launch Corsa.

Enums§

CorsaError
Workspace-wide error type for process, transport, and protocol failures.
CorsaEvent
Structured runtime events that embedders can observe.

Traits§

CorsaObserver
Sink for structured operational events emitted by the workspace.

Type Aliases§

Result
Standard result alias used across the workspace.
SharedObserver
Shared observer handle used across configs and transports.