v2: pin Rust 1.89 and fix sensing-server UI path when run from v2 (#523)
* v2: pin Rust 1.89 for sensing-server dependency chain ruvector-core 2.0.5, hnsw_rs 0.3.4, and mmap-rs 0.7 require newer Cargo/rustc than 1.82 (edition2024 manifest, is_multiple_of, stable avx512f target_feature on x86_64). Add v2/rust-toolchain.toml so cargo build -p wifi-densepose-sensing-server picks a compatible toolchain. Signed-off-by: Chaitanya Tata <chaitanya@dotstarconsulting.com> Co-authored-by: Cursor <cursoragent@cursor.com> * sensing-server: default UI path for cwd v2/ and coalesce fallbacks The previous default ../../ui resolves to a non-existent directory when the binary is run from v2/ (common), so /ui/* returned 404 and the dashboard appeared broken. Default to ../ui and try ../ui, ./ui, ../../ui when the configured path is missing. Signed-off-by: Chaitanya Tata <chaitanya@dotstarconsulting.com> Co-authored-by: Cursor <cursoragent@cursor.com> --------- Signed-off-by: Chaitanya Tata <chaitanya@dotstarconsulting.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
8b297dd706
commit
f853c74563
|
|
@ -19,8 +19,8 @@ pub struct Args {
|
||||||
#[arg(long, default_value = "5005")]
|
#[arg(long, default_value = "5005")]
|
||||||
pub udp_port: u16,
|
pub udp_port: u16,
|
||||||
|
|
||||||
/// Path to UI static files
|
/// Path to UI static files (from `v2/` cwd use `../ui`)
|
||||||
#[arg(long, default_value = "../../ui")]
|
#[arg(long, default_value = "../ui")]
|
||||||
pub ui_path: PathBuf,
|
pub ui_path: PathBuf,
|
||||||
|
|
||||||
/// Tick interval in milliseconds (default 100 ms = 10 fps for smooth pose animation)
|
/// Tick interval in milliseconds (default 100 ms = 10 fps for smooth pose animation)
|
||||||
|
|
|
||||||
|
|
@ -83,8 +83,8 @@ struct Args {
|
||||||
#[arg(long, default_value = "5005")]
|
#[arg(long, default_value = "5005")]
|
||||||
udp_port: u16,
|
udp_port: u16,
|
||||||
|
|
||||||
/// Path to UI static files
|
/// Path to UI static files (repo `ui/`; from `v2/` use `../ui` or rely on auto-detect)
|
||||||
#[arg(long, default_value = "../../ui")]
|
#[arg(long, default_value = "../ui")]
|
||||||
ui_path: PathBuf,
|
ui_path: PathBuf,
|
||||||
|
|
||||||
/// Tick interval in milliseconds (default 100 ms = 10 fps for smooth pose animation)
|
/// Tick interval in milliseconds (default 100 ms = 10 fps for smooth pose animation)
|
||||||
|
|
@ -4341,6 +4341,25 @@ async fn broadcast_tick_task(state: SharedState, tick_ms: u64) {
|
||||||
|
|
||||||
// ── Main ─────────────────────────────────────────────────────────────────────
|
// ── Main ─────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
/// If `--ui-path` points nowhere (wrong cwd), try common repo layouts relative to cwd.
|
||||||
|
fn coalesce_ui_path(initial: std::path::PathBuf) -> std::path::PathBuf {
|
||||||
|
if initial.is_dir() {
|
||||||
|
return initial;
|
||||||
|
}
|
||||||
|
for rel in &["../ui", "./ui", "../../ui"] {
|
||||||
|
let p = std::path::PathBuf::from(rel);
|
||||||
|
if p.is_dir() {
|
||||||
|
warn!(
|
||||||
|
"UI path {} not found; using {} (set --ui-path explicitly if wrong)",
|
||||||
|
initial.display(),
|
||||||
|
p.display()
|
||||||
|
);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
initial
|
||||||
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
// Initialize tracing
|
// Initialize tracing
|
||||||
|
|
@ -4351,7 +4370,8 @@ async fn main() {
|
||||||
)
|
)
|
||||||
.init();
|
.init();
|
||||||
|
|
||||||
let args = Args::parse();
|
let mut args = Args::parse();
|
||||||
|
args.ui_path = coalesce_ui_path(args.ui_path);
|
||||||
|
|
||||||
// Handle --benchmark mode: run vital sign benchmark and exit
|
// Handle --benchmark mode: run vital sign benchmark and exit
|
||||||
if args.benchmark {
|
if args.benchmark {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
# wifi-densepose-sensing-server (ruvector-mincut -> ruvector-core / hnsw_rs / mmap-rs):
|
||||||
|
# - mmap-rs 0.7: Cargo must accept edition 2024 in a dependency manifest (1.85+).
|
||||||
|
# - hnsw_rs 0.3.4: u*.is_multiple_of (1.86+).
|
||||||
|
# - ruvector-core 2.0.5 x86_64: #[target_feature(enable = "avx512f")] (1.89+ stable).
|
||||||
|
[toolchain]
|
||||||
|
channel = "1.89"
|
||||||
|
profile = "minimal"
|
||||||
Loading…
Reference in New Issue