Skip to content

Commit

Permalink
femtopb seems to work
Browse files Browse the repository at this point in the history
  • Loading branch information
XdoctorwhoZ committed Jul 6, 2024
1 parent 9258761 commit e7aa764
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ irq = "0.2.3"
femtopb = "0.4.5"
serial-line-ip = "0.5.0"

[build-dependencies]
femtopb-build = "0.4.5"

# cargo build/run
[profile.dev]
codegen-units = 1
Expand Down
14 changes: 1 addition & 13 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,5 @@ fn main() {
// `memory.x` is changed.
println!("cargo:rerun-if-changed=memory.x");

// protobuf_codegen::Codegen::new()
// // Use `protoc` parser, optional.
// .protoc()
// // Use `protoc-bin-vendored` bundled protoc command, optional.
// .protoc_path(&protoc_bin_vendored::protoc_bin_path().unwrap())
// // All inputs and imports from the inputs must reside in `includes` directories.
// .includes(&["src/protos"])
// // Inputs must reside in some of include paths.
// .input("src/protos/apple.proto")
// .input("src/protos/banana.proto")
// // Specify output directory relative to Cargo output directory.
// .cargo_out_dir("protos")
// .run_from_script();
femtopb_build::compile_protos(&["src/api.proto"], &["src"]).unwrap();
}
7 changes: 7 additions & 0 deletions src/api.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
syntax = "proto3";

message SearchRequest {
uint32 query = 1;
uint32 page_number = 2;
uint32 results_per_page = 3;
}

0 comments on commit e7aa764

Please sign in to comment.