You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Investigate raw-dylib support/workarounds for unicows #15
raw-dylib causes rust to generate import libraries which are, for dependencies, added to their rlib archives. This means they are always linked beforeunicows.lib, preventing unicows from replacing calls to W Unicode APIs to A APIs on 9x/ME.
I'm not sure there is a sensible way of using both at the moment 🤔
Just to note. Since #65 unicows is forcibly injected before all the rest on GNU targets to satisfy the order-dependent linker here.
Maybe make this behavior default and do the same on MSVC ones? That would also eliminate the need to specify standard imports manually.
@cher-nov I'd rather not depend on unicows as a requirement in the first place -- that's currently needed because of the weird linker args needed for -gnu
In af0e5f9 I just added a hopefully definitive solution to this:
It'll link against unicows.lib by default now, in hopefully all required places. To not make it mandatory for NT-only projects, I also added -Zunicows=no as a compiler option to disable that. This should give us the best of both words.
@Jookia would you mind checking if this also works with the -gnu targets? I think the -lunicows can now be omitted!
The rust9x-sample config and the docs will then lose that huge block of configuration, and instead gain
rustflags = [
# rust9x links against `unicows.lib` by default, make sure it's in your search path.'-Clink-arg=/home/seri/mnt/ext4/msvc-toolchains/platformsdk3790/Lib/unicows.lib',
# If you don't want to use `unicows.lib` (you're not targeting Windows 9x/Me), you can disable it:# '-Zunicows=no',
]
Activity
cher-nov commentedon Jul 26, 2026
Just to note. Since #65 unicows is forcibly injected before all the rest on GNU targets to satisfy the order-dependent linker here.
Maybe make this behavior default and do the same on MSVC ones? That would also eliminate the need to specify standard imports manually.
seritools commentedon Jul 26, 2026
@cher-nov I'd rather not depend on unicows as a requirement in the first place -- that's currently needed because of the weird linker args needed for -gnu
seritools commentedon Aug 2, 2026
In af0e5f9 I just added a hopefully definitive solution to this:
It'll link against
unicows.libby default now, in hopefully all required places. To not make it mandatory for NT-only projects, I also added-Zunicows=noas a compiler option to disable that. This should give us the best of both words.@Jookia would you mind checking if this also works with the -gnu targets? I think the
-lunicowscan now be omitted!The rust9x-sample config and the docs will then lose that huge block of configuration, and instead gain
Jookia commentedon Aug 3, 2026
I opened a PR to support this on the GNU toolchain. It works properly and the -Zunicows argument works too.
seritools commentedon Aug 3, 2026
Thanks! Merged, squashed things to clean up a bit, updated docs and sample, and rust9x-1.98-beta-v3 includes this now!