Hey all. I'm trying to write a library that's supposed to compile into a DLL, so I set the cdylib
crate type.
Then I wanted to use cargo test
with it, and cargo test
seems to skip stuff that's just cdylib
so I also set rlib
:
crate-type = ["rlib","cdylib"]
this has worked for me in the past, and it works for me now as well. Then I thought, "well, none of this should allocate, let's make it no_std to enforce that", and when I add #![no_std]
to the top of my lib.rs
file cargo somehow thinks that I'm missing the panic_fmt
and eh_personality
language items and so it won't compile things for me. If I take out the crate-type
specifiers it'll compile a no_std lib, but then I don't get my DLL. If I specify only cdylib
it'll build that no_std but then won't run doctests at all.
Is there some way to build a DLL, also run my doc tests, and also have no_std on the library all at once? Or is this situation just weird enough to fall through the cracks somehow?
Repo with the example files: https://github.com/Lokathor/galaxy-break