Skip to content

Commit 9f30a3c

Browse files
committed
fix: cross bug
1 parent 53f60cc commit 9f30a3c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

rspack/crates/binding/Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,12 @@ rspack_binding_builder = { version = "=0.5.4", features = ["plugin"] }
3535
[build-dependencies]
3636
rspack_binding_build = { version = "=0.5.4" }
3737

38+
# Workaround for `cross` builds to resolve parent workspace dependencies.
39+
# When cross-compiling, the build runs in an isolated container and can't find
40+
# the root workspace (`../../../`), causing a "failed to find a workspace root"
41+
# error for path dependencies like `next-taskless`.
42+
# This mounts the parent directory into the container, making the root `Cargo.toml` visible.
43+
# See: https://github.com/cross-rs/cross/issues/1181
44+
[package.metadata.cross.build.env]
45+
volumes = ["__LIB12_DEP=../../.."]
46+

0 commit comments

Comments
 (0)