Skip to content

Instantly share code, notes, and snippets.

@ren-chon
Created February 6, 2023 17:15
Show Gist options
  • Save ren-chon/ab190341d3983271d4a00a34f2e134e8 to your computer and use it in GitHub Desktop.
Save ren-chon/ab190341d3983271d4a00a34f2e134e8 to your computer and use it in GitHub Desktop.
use RUST from WSL2 Fedora 37 commands without running WSL first.
@echo off
doskey cargo=wsl.exe -u root --shell-type login cargo $*
doskey rustup=wsl.exe -u root --shell-type login rustup $*
doskey rustfmt=wsl.exe -u root --shell-type login rustfmt $*
doskey rustdoc=wsl.exe -u root --shell-type login rustdoc $*
doskey cargo-clippy=wsl.exe -u root --shell-type login cargo-clippy $*
doskey cargo-fmt=wsl.exe -u root --shell-type login cargo-fmt $*
doskey rust-gdb=wsl.exe -u root --shell-type login rust-gdb $*
doskey cargo-fleet=wsl.exe -u root --shell-type login cargo-fleet $*
doskey cargo-miri=wsl.exe -u root --shell-type login cargo-miri $*
doskey rls=wsl.exe -u root --shell-type login rls $*
doskey rust-gdbgui=wsl.exe -u root --shell-type login rust-gdbgui $*
doskey clippy-driver=wsl.exe -u root --shell-type login clippy-driver $*
doskey rust-lldb=wsl.exe -u root --shell-type login rust-lldb $*
doskey rustc=wsl.exe --exec rustc $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment