d_engine_proto/lib.rs
1//! # d-engine-proto
2//!
3//! gRPC protocol definitions for d-engine - foundation for all client implementations
4//!
5//! ## When to use this crate
6//!
7//! - ✅ Building Go/Python/Java clients
8//! - ✅ Need raw `.proto` files for code generation
9//! - ✅ Custom protocol extensions
10//! - ✅ Contributing to d-engine protocol development
11//!
12//! ## For Rust users
13//!
14//! If you're writing Rust code, use [`d-engine`](https://crates.io/crates/d-engine) or
15//! [`d-engine-client`](https://crates.io/crates/d-engine-client) instead - they provide
16//! higher-level APIs on top of these protocol definitions.
17//!
18//! ```toml
19//! [dependencies]
20//! d-engine = { version = "0.2", features = ["client"] }
21//! ```
22//!
23//! ## For Non-Rust Developers
24//!
25//! The `.proto` files are included in this crate. Generate client code for your language:
26//!
27//! ```bash
28//! # Go (✅ Tested - see examples/quick-start-standalone)
29//! protoc -I. \
30//! --go_out=./go \
31//! --go_opt=module=github.com/deventlab/d-engine/proto \
32//! --go-grpc_out=./go \
33//! --go-grpc_opt=module=github.com/deventlab/d-engine/proto \
34//! proto/common.proto \
35//! proto/error.proto \
36//! proto/client/client_api.proto
37//!
38//! # Python (⚠️ Command verified, end-to-end integration not yet tested)
39//! protoc --python_out=./out \
40//! proto/common.proto \
41//! proto/error.proto \
42//! proto/client/client_api.proto
43//! ```
44//!
45//! **Language Support Status:**
46//! - ✅ **Go** - Production-ready with working example
47//! - ⚠️ **Python** - Proto generation verified, client integration pending
48//! - 🔜 **Other languages** - Community contributions welcome
49//!
50//! Protocol files are located in the source repository under `d-engine-proto/proto/`.
51//!
52//! ## Documentation
53//!
54//! For language-specific integration guides:
55//! - [Go Client Example](https://github.com/deventlab/d-engine/tree/main/examples/quick-start-standalone)
56//!
57//! ## Protocol Modules
58//!
59//! This crate provides protobuf-generated Rust types organized by service area:
60
61pub mod common {
62 include!("generated/d_engine.common.rs");
63}
64
65pub mod error {
66 include!("generated/d_engine.common.error.rs");
67}
68pub mod server {
69 pub mod cluster {
70 include!("generated/d_engine.server.cluster.rs");
71 }
72
73 pub mod replication {
74 include!("generated/d_engine.server.replication.rs");
75 }
76
77 pub mod election {
78 include!("generated/d_engine.server.election.rs");
79 }
80
81 pub mod storage {
82 include!("generated/d_engine.server.storage.rs");
83 }
84}
85
86pub mod client {
87 include!("generated/d_engine.client.rs");
88}
89
90pub mod exts;