Skip to content

Commit 5c2dfd1

Browse files
author
wangnaihe
committed
fix: replace w3cos-build with workspace demo crate for reliable Docker builds
The `w3cos build` command creates temp cargo projects which fail in Docker (Exec format error, path resolution issues). Instead, pre-generate the showcase Rust code as a proper workspace member `w3cos-demo` that compiles directly with `cargo build -p w3cos-demo`. - Add crates/w3cos-demo/ with pre-generated showcase main.rs - Simplify HF Space Dockerfile to use cargo build directly - Update start.sh to use w3cos-demo binary Made-with: Cursor
1 parent 0cb29e5 commit 5c2dfd1

File tree

6 files changed

+688
-23
lines changed

6 files changed

+688
-23
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ members = [
88
"crates/w3cos-dom",
99
"crates/w3cos-a11y",
1010
"crates/w3cos-ai-bridge",
11+
"crates/w3cos-demo",
1112
]
1213

1314
[workspace.package]

crates/w3cos-demo/Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "w3cos-demo"
3+
version.workspace = true
4+
edition.workspace = true
5+
license.workspace = true
6+
description = "W3C OS showcase demo binary — pre-compiled from examples/showcase/app.tsx"
7+
8+
[[bin]]
9+
name = "w3cos-demo"
10+
path = "src/main.rs"
11+
12+
[dependencies]
13+
w3cos-runtime = { workspace = true }
14+
w3cos-std = { workspace = true }

0 commit comments

Comments
 (0)