feat: prepare for crates.io publishing (#312)

* feat: prepare  for crates.io publishing

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

* fix: exclude typos check

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

* fix: add header for each file

Signed-off-by: jeremyhi <fengjiachun@gmail.com>

---------

Signed-off-by: jeremyhi <fengjiachun@gmail.com>
This commit is contained in:
jeremyhi
2026-04-07 20:12:39 -07:00
committed by GitHub
parent 092ba1d01e
commit 32d60146e5
24 changed files with 9971 additions and 114 deletions
+13 -7
View File
@@ -1,16 +1,17 @@
# greptime-proto
GreptimeDB protobuf files.
GreptimeDB protobuf definitions and pre-generated Rust bindings.
## Build
### Requirement
- [google/protobuf][protobuf] v3
- Rust consumers do not need `protoc`.
- Maintainers need [google/protobuf][protobuf] v3 to regenerate Rust bindings after `.proto` changes.
### Command
- **Compile for Rust**
- **Generate Rust bindings**
```console
make rust
@@ -34,12 +35,11 @@ GreptimeDB protobuf files.
### Rust
```Toml
# Add this repository as dependency to your Cargo.toml file:
greptime-proto = { git = "https://github.com/GreptimeTeam/greptime-proto.git" }
```toml
greptime-proto = "0.1"
```
```Rust
```rust
// To use the GreptimeDB's gRPC service:
use greptime_proto::v1::*;
@@ -50,6 +50,12 @@ use greptime_proto::v1::meta::*;
use greptime_proto::prometheus::remote::*;
```
When working in this repository, regenerate the checked-in Rust bindings after `.proto` changes with:
```console
cargo run --manifest-path xtask/Cargo.toml -- generate-rust
```
### Go
Download the go module: