[GH-ISSUE #12] Bundle crates #5

Open
opened 2026-11-02 15:32:20 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @reservedbytes on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon-mixins/issues/12

Found while testing bundle crates against fixtures/native and horizon-rust/horizon#3964, still there on main

A mod's crates can't use each other: boost-util = { path = "../util" } between two [[crate]]s of the same bundle is 'path' is not allowed

I think bigger mods will want to split their code, so a path to another crate of the same mod could be allowed

[lib] name isn't checked... name = "serde_json" in a crate called boost-engine plans fine, then the build fails with cannot find module or crate boost_engine

A [[bin]] that claims src/main.rs under another name still makes the package name count as a bin, so bin = "boost-engine" passes E_POST_BUILD and Cargo only refuses it after the whole game compiled

A Windows-style path (path = "mods\\engine", helper = "hooks\\tick.rs") fails with E_IO: No such file or directory, without saying which path

I think it works on Windows (\ is a separator there), so the same bundle would only break for others. I would refuse \ with a "use /" message

Originally created by @reservedbytes on GitHub (Oct 30, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon-mixins/issues/12 Found while testing bundle crates against `fixtures/native` and horizon-rust/horizon#3964, still there on `main` A mod's crates can't use each other: `boost-util = { path = "../util" }` between two `[[crate]]`s of the same bundle is `'path' is not allowed` I think bigger mods will want to split their code, so a path to another crate of the same mod could be allowed `[lib] name` isn't checked... `name = "serde_json"` in a crate called `boost-engine` plans fine, then the build fails with `cannot find module or crate boost_engine` A `[[bin]]` that claims `src/main.rs` under another name still makes the package name count as a bin, so `bin = "boost-engine"` passes `E_POST_BUILD` and Cargo only refuses it after the whole game compiled A Windows-style path (`path = "mods\\engine"`, `helper = "hooks\\tick.rs"`) fails with `E_IO: No such file or directory`, without saying which path I think it works on Windows (`\` is a separator there), so the same bundle would only break for others. I would refuse `\` with a "use `/`" message
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon-mixins#5
No description provided.