The Oxidation wiki <https://wiki.mozilla.org/Oxidation> has this entry in its FAQ <https://wiki.mozilla.org/Oxidation#FAQ>:
*Q:* How are in-tree Rust crates tested? *A:* In general we don't run tests for third-party crates; the assumption is that these crates are sufficiently well-tested elsewhere. (Which means that large test fixtures should be removed when vendoring third-party crates, because they just bloat mozilla-central.) Mozilla crates can be tested with cargo test by adding them to RUST_TESTS in toolkit/library/rust/moz.build. Alternatively, you can write a GTest that uses FFI to call into Rust code I don't know how accurate or complete that is, but hopefully it's a start. Feel free to update it if necessary. Nick On Tue, 12 May 2020 at 08:37, Dave Townsend <dtowns...@mozilla.com> wrote: > Do we have any standard way to test in-tree Rust code? > > Context: We're building a standalone binary in Rust that in the future will > be distributed with Firefox and of course we want to test it. It lives > in-tree and while we could use something like xpcshell to drive the > produced executable and verify its effects it would be much nicer to be > able to use Rust tests themselves. But I don't see a standard way to do > that right now. > > Is there something, should we build something? > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform