#api-bindings

dfhack-proto

Generated code from the DFHack API

13 releases (6 breaking)

0.8.0 Nov 20, 2023
0.7.0 May 13, 2023
0.6.2 May 1, 2023
0.4.3 Jan 23, 2023
0.4.1 May 1, 2022

#445 in Game dev

Download history 11/week @ 2023-08-20 16/week @ 2023-08-27 40/week @ 2023-09-03 13/week @ 2023-09-10 9/week @ 2023-09-17 13/week @ 2023-09-24 15/week @ 2023-10-01 9/week @ 2023-10-08 16/week @ 2023-10-15 13/week @ 2023-10-22 33/week @ 2023-10-29 12/week @ 2023-11-05 16/week @ 2023-11-12 76/week @ 2023-11-19 79/week @ 2023-11-26 13/week @ 2023-12-03

185 downloads per month
Used in dfhack-remote

MIT/Apache

2MB
42K SLoC

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.

Dependencies

~1.7–5MB
~96K SLoC