Single member workspace different binary?

I've got an odd case where if I use a single member workspace "wrapper" I get a different (and working) binary as a result compared to using the project directly. The workspace is defined simply as:


members = ["pinetime-quickstart"]

No dependency overrides.

The project uses git = ... dependencies pinned to specific revisions. Somehow the resulting binaries differ and only the one in the workspace works fine. I suspect there's some sort of versioning/git issue with cargo since nothing else makes sense.

The dependencies on the top level project are:

git = ""
rev = "e56c4e5"

git = ""
rev = "4da5554"

And the dependency for embedded-graphics on the ST7789 in given revision is:

optional = true
git = ""
rev = "4da5554"

Any idea how come a workspace-less build produces a different binary? The version from workspace is almost 2x bigger (both unstripped)

Figured it out, but it's a bug in rust it seems.


codegen-units = 1 # better optimizations
debug = true # symbols are nice and they don't increase the size on Flash
lto = true # better optimizations

Causes it to stop working...

It works in a workspace because these only apply outside of workspace or if defined in the workspace toml.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.