Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of changes for native launch #11

Open
i509VCB opened this issue Jan 25, 2022 · 0 comments
Open

List of changes for native launch #11

i509VCB opened this issue Jan 25, 2022 · 0 comments
Labels
native-launch Issues pertaining to the native launch bootstrap

Comments

@i509VCB
Copy link
Contributor

i509VCB commented Jan 25, 2022

A few changes should be made to the native launch mechanism:

  1. Migrate to rfd. Fundamentally it is a better library for message dialogs.
  2. Fully clippy migration: See Use clippy for linting #10
  3. 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<()>;
}
  1. Build changes
  • Binaries should also have symbols stripped, there is a strip field in profiles now.
@i509VCB i509VCB added the native-launch Issues pertaining to the native launch bootstrap label Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
native-launch Issues pertaining to the native launch bootstrap
Projects
None yet
Development

No branches or pull requests

1 participant