merlon
merlon copied to clipboard
Support Windows natively
I don't have Windows, so I'd greatly appreciate help with this! Message me on Discord for more info (nanalan#0771).
Merlon currently supports Windows via WSL 2 and the Linux build. However, there shouldn't be anything stopping us from executing shell commands inside WSL but from a native Windows executable.
Specifically:
- All of the calls to
Command::newwithin the package (package.rs, init.rs, tests/dependencies.rs) need to be calls towslfollowed by the rest of the args. It would be good to create a method onPackagelikepub fn run_command(args: &[str]) -> Result<String>that constructs aCommandwith the given args, runs it with the current directory being the package directory, and returns stdout/stderr. On Windows (#[cfg(target_os = "win32")]) we can prependwsltoargs. -
emulator::run_romneeds to use a Windows version of the ROM path (i.e.$wsl://or whatever it is). wslpath2 might be useful here! - Print a warning if a
Packageis created with a non-WSL path on Windows arguing that compiling in the Windows filesystem is a source of performance issues.