Library for writing my own assembly tests?

The standard library has assembly tests (and somewhat related, codegen tests) for verifying certain properties of the compiler.

Is there a way that I could use a similar setup, e.g. to verify that a specific optimization happens in release mode, or that the correct properties are passed on to LLVM or the linker? Can you recommend a crate that provides similar functionality, or some pointers on how I could set it up myself?

Depending on your use case, you might be able to use the compiletest_rs crate. It was originally extracted from rustc's test harness.

1 Like

I knew I had seen such a crate before, just couldn't find i again, thanks a lot!

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.