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§
- Bronzite
Client - 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.