I'd like to propose moving the definitions of structs such as
TestDescAndFn etc. in libtest into a separate crate.
I'm interested in using the
#[test] annotation in a
no_std environment, together with
custom_test_frameworks. I'm aware of
#[test_case], however I would like to be able to also use
#[should_panic]. The rust compiler already parses this attribute and makes it available in the
no_std using libtest is currently not possible, since it requires
std. The panic part is problematic, since this clashes with the custom
Moving the definitions of the structs and enums into a seperate (internal) crate would allow
#[test] to work with
no_std. The parsing of
should_panic and other attributes is done at compile time and requires no special runtime support.
#[test] attribute should then work without libtest and only require the new internal crate containing the struct definitions, when used together with a
I could also make do with manually copying the definitions, as long as they have a defined layout via
#[repr(C)]. Since libtest may change at any time, this is obviously not a preferred solution.
I hope this is the right place to ask about this. Are there any reasons I missed, why this is not feasible?