Skip to content

Commit cf7f883

Browse files
committed
update
Signed-off-by: wep21 <daisuke.nishimatsu1021@gmail.com>
1 parent ee06a2e commit cf7f883

File tree

8 files changed

+2706
-90
lines changed

8 files changed

+2706
-90
lines changed

Cargo.lock

Lines changed: 2665 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ members = [
66
]
77
resolver = "2"
88

9-
# Optional: Default members for `cargo build` and `cargo run` when in the root
10-
# default-members = ["examples"] # Or any specific crate you want to build/run by default
11-
12-
# Optional: Common dependencies for the workspace can be defined here
13-
# [workspace.dependencies]
14-
# cxx = "1.0.149"
15-
# image = "0.25.0"
16-
# etc.
17-
# This allows member crates to inherit them using `dep_name.workspace = true`
18-
# For now, keeping it simple as per the plan.
9+
[workspace.package]
10+
edition = "2021"
11+
description = "Pose Track with RTMO and ByteTrack"
12+
homepage = "https://github.com/wep21/tensorrt-rtmo-rust"
13+
license = "MIT OR Apache-2.0"
14+
authors = [
15+
"Daisuke Nishimatsu <daisuke.nishimatsu1021@gmail.com>",
16+
]
17+
readme = "README.md"
18+
repository = "https://github.com/wep21/tensorrt-rtmo-rus"
19+
rust-version = "1.81"
20+
version = "0.1.0"

MODULE.bazel

Lines changed: 13 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -26,51 +26,20 @@ use_repo(rust, "rust_toolchains")
2626

2727
register_toolchains("@rust_toolchains//:all")
2828

29-
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")
30-
crate.spec(
31-
package = "image",
32-
version = "0.25.0",
29+
crate = use_extension(
30+
"@rules_rust//crate_universe:extensions.bzl",
31+
"crate",
3332
)
34-
crate.spec(
35-
features = ["ndarray"],
36-
package = "video-rs",
37-
version = "0.10.3",
38-
)
39-
crate.spec(
40-
package = "minifb",
41-
version = "0.28.0",
42-
)
43-
crate.spec(
44-
package = "thiserror",
45-
version = "2.0.12",
46-
)
47-
crate.spec(
48-
package = "nalgebra",
49-
version = "0.33.2",
50-
)
51-
crate.spec(
52-
package = "num",
53-
version = "0.4.3",
54-
)
55-
crate.spec(
56-
package = "nearly_eq",
57-
version = "0.2.4",
58-
)
59-
crate.spec(
60-
package = "quickcheck",
61-
version = "1.0.3",
62-
)
63-
crate.spec(
64-
package = "rand",
65-
version = "0.8.5",
66-
)
67-
crate.spec(
68-
package = "ab_glyph",
69-
version = "0.2.29",
70-
)
71-
crate.spec(
72-
package = "imageproc",
73-
version = "0.25.0",
33+
34+
crate.from_cargo(
35+
name = "crates",
36+
cargo_lockfile = "//:Cargo.lock",
37+
manifests = [
38+
"//:Cargo.toml",
39+
"//detector:Cargo.toml",
40+
"//examples:Cargo.toml",
41+
"//tracker:Cargo.toml",
42+
],
7443
)
7544
crate.annotation(
7645
build_script_env = dict(
@@ -84,7 +53,6 @@ crate.annotation(
8453
crate = "rav1e",
8554
repositories = ["crates"],
8655
)
87-
crate.from_specs()
8856
use_repo(crate, "crates")
8957

9058
bazel_dep(

detector/Cargo.toml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "rtmo"
3-
version = "0.1.0" # Default version, can be adjusted
4-
edition = "2021" # From MODULE.bazel (rust.toolchain)
5-
authors = ["Your Name <you@example.com>"] # Placeholder
3+
version = { workspace = true }
4+
edition = { workspace = true }
5+
authors = { workspace = true }
66

77
[lib]
88
name = "rtmo"
@@ -11,11 +11,5 @@ path = "src/lib.rs"
1111
[dependencies]
1212
cxx = "1.0.149"
1313

14-
# For handling the C++ compilation and linking:
1514
[build-dependencies]
16-
cxx-build = "1.0.149" # Or a suitable build script helper if available via rules_rust
17-
18-
# Potentially, if rtmo.rs is a separate module for the bridge
19-
# [[bin]]
20-
# name = "rtmo_bridge_bin" # Example if it were a binary
21-
# path = "src/rtmo.rs"
15+
cxx-build = "1.0.149"

detector/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn main() {
1919

2020
// --- TensorRT ---
2121
// Path relative to workspace root.
22-
let tensorrt_base_path = workspace_root.join("repositories/tensorrt");
22+
let tensorrt_base_path = workspace_root.join("/usr");
2323
let tensorrt_include_path = tensorrt_base_path.join("include/x86_64-linux-gnu");
2424
let tensorrt_lib_path = tensorrt_base_path.join("lib/x86_64-linux-gnu");
2525

@@ -29,7 +29,7 @@ fn main() {
2929

3030
// --- CVCUDA ---
3131
// Path relative to workspace root.
32-
let cvcuda_base_path = workspace_root.join("repositories/cvcuda");
32+
let cvcuda_base_path = workspace_root.join("/usr");
3333
let cvcuda_include_path = cvcuda_base_path.join("include");
3434
let cvcuda_lib_path = cvcuda_base_path.join("lib");
3535

detector/src/rtmo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "rtmo.hpp"
22

3+
#if __has_include("rtmo/src/rtmo.rs.h")
4+
#include "rtmo/src/rtmo.rs.h"
5+
#else
36
#include "rtmo.rs.h"
7+
#endif
48

59
namespace rtmo {
610
Rtmo::~Rtmo() {

examples/Cargo.toml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
[package]
22
name = "examples"
3-
version = "0.1.0"
4-
edition = "2021" # From MODULE.bazel (rust.toolchain)
5-
authors = ["Your Name <you@example.com>"] # Placeholder
6-
publish = false # Examples are typically not published
3+
version = { workspace = true }
4+
edition = { workspace = true }
5+
authors = { workspace = true }
76

87
[[bin]]
98
name = "image_demo"
@@ -23,8 +22,3 @@ ab_glyph = "0.2.29"
2322
imageproc = "0.25.0"
2423
minifb = "0.28.0"
2524
video-rs = { version = "0.10.3", features = ["ndarray"] }
26-
27-
# Note: Since image_demo does not use tracker, ab_glyph, imageproc, minifb, video-rs,
28-
# these will still be compiled if you do `cargo build --bin image_demo` because
29-
# they are listed as common dependencies. For example crates, this is often acceptable.
30-
# If strict separation is needed, they would need to be separate Cargo packages.

tracker/Cargo.toml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "tracker"
3-
version = "0.1.0"
4-
edition = "2021" # From MODULE.bazel (rust.toolchain)
5-
authors = ["Your Name <you@example.com>"] # Placeholder
3+
version = { workspace = true }
4+
edition = { workspace = true }
5+
authors = { workspace = true }
66

77
[lib]
88
name = "tracker"
@@ -15,17 +15,6 @@ num = "0.4.3"
1515
thiserror = "2.0.12"
1616

1717
[dev-dependencies]
18-
# rtmo = { path = "../detector" } # Already in [dependencies]
19-
# nalgebra = "0.33.2" # Already in [dependencies]
20-
# num = "0.4.3" # Already in [dependencies]
21-
# thiserror = "2.0.12" # Already in [dependencies]
2218
nearly_eq = "0.2.4"
2319
quickcheck = "1.0.3"
2420
rand = "0.8.5"
25-
26-
# The tracker_test in BUILD.bazel uses srcs = glob(["src/*.rs"]),
27-
# which suggests tests might be inline or in files picked up by Cargo's
28-
# default test discovery (e.g. src/tests/some_test.rs or tests/integration_test.rs).
29-
# If tests are embedded within lib.rs or other src/*.rs files (like src/test_byte_tracker.rs),
30-
# Cargo will pick them up automatically. No specific [[test]] section is needed
31-
# unless there's a non-standard test file name or location.

0 commit comments

Comments
 (0)