Add grpc rust codegen + stubs, add rppal compile feature

for raspberry pi compilation.

This is because rppal won't compile on mac, so we
only want to bring in the dependency when actually compiling
for the raspberry pi, and so will manually need to enable the
dependency.
This commit is contained in:
Piv
2022-08-06 20:34:00 +09:30
parent 26647017c3
commit d876fcbb2e
7 changed files with 395 additions and 32 deletions

View File

@@ -7,11 +7,22 @@ edition = "2021"
[dependencies]
# https://github.com/golemparts/rppal
rppal = "0.13.1"
rppal = { version = "0.13.1", optional = true }
tokio = { version = "1", features = ["full"] }
prost = "0.11"
# https://github.com/hyperium/tonic
tonic = "0.8.0"
# https://docs.rs/serialport/4.0.1/serialport/index.html
serialport = "4.0.1"
[build]
target = "armv7-unknown-linux-gnueabihf"
target = "armv7-unknown-linux-gnueabihf"
[build-dependencies]
tonic-build = "0.8.0"
[features]
rppal = ["dep:rppal"]