Skip to main content

Crate dfhack_proto

Crate dfhack_proto 

Source
Expand description

§dfhack_proto

Crates.io docs.rs Crates.io

This subcomponent of dfhack_remote contains all the generated code for interacting with DFHack remote API.

It contains two main modules:

  • messages exposes the protobuf messages. This is the standard generated protobuf.
  • stubs exposes the plugins and their RPC. DFHack is not using gRPC and this is a custom implementation

Internally these two modules are created under the generated module.

The terminology is based on gRPC: The stubs expose the feature from the plugin. They are built from a channel implementing the data exchange.

The code is regenerated under the condition that the environment variable DFHACK_REGEN is set.

This crates generates all its code directly in a source subfolder. It would likely be cleaner to use the $OUT_DIR, or macro to do this job.

Modules§

messages
Raw protobuf messages
reflection
Reflection for runtime inspection of the stubs.
stubs
Stubs exposing the feature of the DFHack remote API.

Structs§

Reply
Reply to a request, it contains the actual reply value, and additional text fragments.

Traits§

Channel
The Channel is the low-level exchange implementation.
Message
Message exchanged by dfhack-remote