mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-05-11 21:33:10 +00:00
api: Build rust code in nix-shell.
This commit is contained in:
parent
9453ab7e00
commit
c3f463da4e
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -4577,9 +4577,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.36.0"
|
||||
version = "1.37.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931"
|
||||
checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787"
|
||||
dependencies = [
|
||||
"backtrace",
|
||||
"bytes",
|
||||
|
4
Makefile
4
Makefile
@ -58,7 +58,7 @@ docker-devshell-ui:
|
||||
|
||||
# Runs the tests
|
||||
test:
|
||||
cd api && make
|
||||
cd api && make rust
|
||||
cd backend && cargo test
|
||||
cd chirpstack && make test
|
||||
cd lrwn && make test
|
||||
@ -66,7 +66,7 @@ test:
|
||||
|
||||
# Runs all the tests (including some that normally are ignored)
|
||||
test-all:
|
||||
cd api && make
|
||||
cd api && make rust
|
||||
cd backend && cargo test
|
||||
cd chirpstack && make test-all
|
||||
cd chirpstack-integration && cargo test
|
||||
|
13
api/Dockerfile-rust
vendored
13
api/Dockerfile-rust
vendored
@ -1,13 +0,0 @@
|
||||
FROM rust:1.73
|
||||
|
||||
ENV PROJECT_PATH=/chirpstack/api
|
||||
RUN apt-get update && \
|
||||
apt-get install -y make cmake git bash protobuf-compiler && \
|
||||
apt-get clean
|
||||
|
||||
RUN git clone https://github.com/googleapis/googleapis.git /googleapis
|
||||
|
||||
RUN rustup component add rustfmt
|
||||
|
||||
RUN mkdir -p $PROJECT_PATH
|
||||
WORKDIR $PROJECT_PATH
|
5
api/Makefile
vendored
5
api/Makefile
vendored
@ -1,10 +1,9 @@
|
||||
.PHONY: rust grpc-web go js python md java kotlin csharp
|
||||
|
||||
all:
|
||||
docker compose up
|
||||
all: rust grpc-web go js python md java kotlin csharp
|
||||
|
||||
rust:
|
||||
docker compose run --rm chirpstack-api-rust
|
||||
cd rust && make
|
||||
|
||||
grpc-web:
|
||||
cd grpc-web && make
|
||||
|
1234
api/rust/Cargo.lock
generated
vendored
1234
api/rust/Cargo.lock
generated
vendored
File diff suppressed because it is too large
Load Diff
2
api/rust/Cargo.toml
vendored
2
api/rust/Cargo.toml
vendored
@ -22,7 +22,7 @@ hex = "0.4"
|
||||
rand = "0.8"
|
||||
|
||||
tonic = { version = "0.11", features = ["codegen", "prost"], default-features = false, optional = true }
|
||||
tokio = { version = "1.36", features = ["macros"], optional = true }
|
||||
tokio = { version = "1.37", features = ["macros"], optional = true }
|
||||
pbjson = { version = "0.6", optional = true }
|
||||
pbjson-types = { version = "0.6", optional = true }
|
||||
serde = { version = "1.0", optional = true }
|
||||
|
5
api/rust/Makefile
vendored
5
api/rust/Makefile
vendored
@ -5,10 +5,9 @@ all: proto test
|
||||
proto:
|
||||
rm -rf proto
|
||||
mkdir -p proto/chirpstack
|
||||
mkdir -p proto/google
|
||||
cp -r ../proto/* proto/chirpstack
|
||||
mkdir -p proto/google/google/api
|
||||
cp /googleapis/google/api/annotations.proto proto/google/google/api
|
||||
cp /googleapis/google/api/http.proto proto/google/google/api
|
||||
mv proto/chirpstack/google proto/google/
|
||||
|
||||
test:
|
||||
cargo test
|
||||
|
Loading…
x
Reference in New Issue
Block a user