Hello,
I have a lib crate with a that provide a conditionally compiled function with the following attributes:
#[cfg(target_arch = "x86_64")]
#[target_feature(enable = "sse4.2")]
pub unsafe fn foo() {
...use of some sse4.2 intrinsics....
}
The library provides integration tests.
The foo()
is tested in a tests/test.rs
Is it possible to add the target_arch
and target_feature
at crate test level? Or at least to test function level?
Test of foo
is importing mycrate-sys::foo
, use static slice for assertion comparison, etc...
I don't want to add the target_arch
and target_feature
for each symbol and use and mod that is in the test.rs
and even if i do that I have an
error attribute should be applied to a function
when write this:
#[target_feature(enable = "sse4.2")]
use mycrate-sys::foo;
Thank you