A few changes should be made to the native launch mechanism:
Migrate to rfd. Fundamentally it is a better library for message dialogs.
Fully clippy migration: See #10
Rework platform specific search directories to be specified via a trait based api.
OS specific field definitions is quite raw. Ideally we would have a JvmPlatform trait like below which each platform exposes an implementation of.
// Not the final definition of the trait
pub trait JvmPlatform: Sized {
/// Returns a list of paths indicating where a JVM may be installed.
fn search_directories() -> Vec<PathBuf>;
/// Returns whether the JVM installed at the location.
fn is_jvm_installed(path: impl AsRef<Path>) -> bool {
self.run_jvm(path, &["--version"]).ok()
}
/// Run a JVM command using the JVM at the specified path.
fn run_jvm(path: impl AsRef<Path>, args: &[&str]) -> io::Result<()>;
}
Build changes
Binaries should also have symbols stripped, there is a strip field in profiles now.
A few changes should be made to the native launch mechanism:
rfd
. Fundamentally it is a better library for message dialogs.JvmPlatform
trait like below which each platform exposes an implementation of.strip
field in profiles now.