awslabs / mls-rs

An implementation of Messaging Layer Security (RFC 9420)
Apache License 2.0
105 stars 19 forks source link

[uniffi] Auto-download Kotlin dependencies #149

Closed mgeisler closed 7 months ago

mgeisler commented 7 months ago

Issues:

Addresses #103.

Description of changes:

This is a follow up to #133. It makes cargo test automatically download the necessary jar files used by the test code. The jars are cached in $CARGO_TARGET_TMPDIR, i.e., in target/tmp.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT license.

mgeisler commented 7 months ago

This is based on the suggestion by @mulmarta in #133. People still have to install Kotlin and Maven, but we'll now automatically fetch the necessary jars to run the tests. This should make maintenance a bit easier going forward.

mgeisler commented 7 months ago

Thanks a lot! I (for one) usually run cargo test on workspace and this makes my life way easier.

Yeah, mine too :smile: it was annoying to download and maintain those jars.

In general, is it a common practice in Rust to list not-so-obvious tools needed to build & test? I mean kotlin and maven, but also openssl required by mls-rs tests.

I don't know of a convention — one could have a build.rs script which errors out with a nice message, but that's the only thing I can think of.