Skip to content

Commit

Permalink
RSDK-4040 RSDK-3446 Make dialdbg a feature instead of a crate (viamro…
Browse files Browse the repository at this point in the history
  • Loading branch information
benjirewis committed Jul 28, 2023
1 parent ca8adde commit 27fb7fa
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 263 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ jobs:
if: inputs.version != 'nobump'
run: |
cargo install cargo-release
cargo release version ${{ inputs.version }} --execute --no-confirm
# Include dialdbg feature to publish dialdbg. Users can later use
# `cargo add viam-rust-utils --features dialdbg` if they want access
# to dialdbg for some reason.
cargo release version ${{ inputs.version }} --features dialdbg --execute --no-confirm
- name: Which Version
id: which_version
Expand Down
29 changes: 7 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 11 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,21 @@ crate-type = ["cdylib","lib"]
doctest = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
dialdbg = []

[[bin]]
name = "viam-dialdbg"
path = "src/dialdbg/main.rs"
required-features = ["dialdbg"]

[dependencies]
anyhow = { version = "1.0", features = ["backtrace"]}
base64 = "0.13.0"
byteorder = "1.4.3"
bytes = "1.1.0"
chrono = "0.4.26"
clap = { version = "4.3.19", features = ["derive"] }
dashmap = "5.4.0"
derivative = "2.2.0"
ffi_helpers = "0.3.0"
Expand All @@ -32,6 +42,7 @@ interceptor = "0.8.0"
interfaces = "0.0.8"
libc = {version = "0.2"}
log = "0.4.17"
log4rs = "1.2.0"
nalgebra = "0.31.4"
prost = "0.11"
prost-types = "0.11"
Expand All @@ -56,11 +67,3 @@ env_logger = "0.9.0"

[build-dependencies]
tonic-build = {version = "0.9.2",features = ["prost"]}

[workspace]

# dialdbg exists as a member of the workspace so it gets its own crate.
members = [
"dialdbg",
]
exclude = [ "examples" ]
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ build:
build-example:
cd examples/ && cargo build
build-dialdbg:
cd dialdbg/ && cargo build
# this target is used by homebrew; if altering, update homebrew formula.
cargo build --release --features dialdbg
buf-clean:
find src/gen -type f \( -iname "*.rs" ! -iname "mod.rs" \) -delete
buf-install:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Next run the following command `curl --proto '=https' --tlsv1.2 -sSf https://sh.
## Repository Layout
- `src/gen` All the google and viam api proto files
- `src/dial` The implementation of gRPC over webRTC used for p2p connection to robots
- `src/dialdbg` A CLI debugging tool for dial logic. See `src/dialdbg/README.md`.
- `src/ffi` FFI wrapper for dial logic
- `src/proxy` Logic for creating a unix socket to serve as connectiong proxy
- `examples` A list of examples
Expand Down
21 changes: 0 additions & 21 deletions dialdbg/Cargo.toml

This file was deleted.

201 changes: 0 additions & 201 deletions dialdbg/LICENSE

This file was deleted.

2 changes: 1 addition & 1 deletion etc/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ while ! lsof -i ":$SERVER_PORT" | grep -q LISTEN; do
sleep 0.1
done

SERVER_PORT=$SERVER_PORT cargo test --workspace
SERVER_PORT=$SERVER_PORT cargo test --workspace --features dialdbg
result=$?

kill "$(lsof -t -i:$SERVER_PORT)"
Expand Down
Loading

0 comments on commit 27fb7fa

Please sign in to comment.