Skip to content

Commit

Permalink
switch to prost (#5)
Browse files Browse the repository at this point in the history
* use prost

Signed-off-by: Alex Chi <[email protected]>

* fix format

Signed-off-by: Alex Chi <[email protected]>
  • Loading branch information
skyzh committed Sep 30, 2020
1 parent 590dbf2 commit fc497f1
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 1,931 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@ jobs:
with:
command: fmt
args: -- --check
- name: Install Protoc 🛎️
uses: arduino/setup-protoc@v1
with:
version: '3.x'
- name: Install protobuf-codegen 🛎️
run: cargo install protobuf-codegen --version ~2.10
- name: Check Protobuf Files 🔧
run: |
make proto
git diff --exit-code
- uses: actions-rs/cargo@v1
name: Running Tests 🚀
with:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ proto = { path = "proto" }
skiplist = { path = "skiplist" }
memmap = "0.7"
farmhash = "1.1"
protobuf = "2.10"
prost = "0.6"

[workspace]
members = [
Expand Down
8 changes: 5 additions & 3 deletions proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ version = "0.1.0"
authors = ["Jay Lee <[email protected]>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
protobuf = "2.10.0"
bytes = "0.5"
prost = "0.6"

[build-dependencies]
prost-build = { version = "0.6" }
3 changes: 3 additions & 0 deletions proto/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
prost_build::compile_protos(&["src/proto/meta.proto"], &["src/proto"]).unwrap();
}
4 changes: 3 additions & 1 deletion proto/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
pub mod meta;
pub mod meta {
include!(concat!(env!("OUT_DIR"), "/meta.rs"));
}
Loading

0 comments on commit fc497f1

Please sign in to comment.