Crate bronzite_client

Crate bronzite_client 

Source
Expand description

Client library for querying the Bronzite type system daemon from proc-macros.

This crate provides a simple API for proc-macros to query type information from a running Bronzite daemon. The daemon compiles the crate once and caches the type information, allowing many proc-macro invocations to share the same compilation result.

§Example

ⓘ
use bronzite_client::{BronziteClient, ensure_daemon_running};

// Ensure daemon is running (auto-starts if needed)
ensure_daemon_running()?;

let mut client = BronziteClient::connect()?;
let items = client.list_items("my_crate")?;

Structs§

BronziteClient
A client for communicating with the Bronzite daemon.

Enums§

Error
Errors that can occur when using the Bronzite client.

Functions§

connect
Try to connect to an existing daemon, or return an error if not running.
connect_for_workspace
Try to connect to an existing daemon for a specific workspace.
connect_or_start
Connect to the daemon, ensuring it’s running first.
ensure_daemon_running
Ensure the daemon is running, starting it if necessary.
ensure_daemon_running_with_timeout
Ensure the daemon is running with a custom timeout.
is_daemon_running
Check if the daemon is running and responding.
is_daemon_running_at
Check if a daemon is running at a specific socket path.

Type Aliases§

Result
Result type for Bronzite operations.