mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 11:26:41 +00:00
feat(tools): install Rust-based CLI tools with mise
Use `mise` to install and manage tools normally installed with `cargo install`.
This commit is contained in:
@@ -1,4 +1,20 @@
|
|||||||
[tools]
|
[tools]
|
||||||
|
"cargo:bacon" = "latest"
|
||||||
|
"cargo:bat" = "latest"
|
||||||
|
"cargo:cargo-audit" = "latest"
|
||||||
|
"cargo:cargo-binstall" = "latest"
|
||||||
|
"cargo:cargo-edit" = "latest"
|
||||||
|
"cargo:cargo-info" = "latest"
|
||||||
|
"cargo:cargo-quickinstall" = "latest"
|
||||||
|
"cargo:cargo-update" = "latest"
|
||||||
|
"cargo:difftastic" = "latest"
|
||||||
|
"cargo:dirstat-rs" = "latest"
|
||||||
|
"cargo:eza" = "latest"
|
||||||
|
"cargo:gitu" = "0.19"
|
||||||
|
"cargo:hexyl" = "latest"
|
||||||
|
"cargo:jwt-cli" = "latest"
|
||||||
|
"cargo:sccache" = "latest"
|
||||||
|
"cargo:tlrc" = "latest"
|
||||||
"go:github.com/bufbuild/buf-language-server/cmd/bufls" = "latest"
|
"go:github.com/bufbuild/buf-language-server/cmd/bufls" = "latest"
|
||||||
"go:github.com/go-delve/delve/cmd/dlv" = "latest"
|
"go:github.com/go-delve/delve/cmd/dlv" = "latest"
|
||||||
"go:github.com/golang/mock/mockgen" = "latest"
|
"go:github.com/golang/mock/mockgen" = "latest"
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
|
cargo_binstall = true
|
||||||
experimental = true
|
experimental = true
|
||||||
legacy_version_file = true
|
legacy_version_file = true
|
||||||
|
|||||||
34
zsh/rust.zsh
34
zsh/rust.zsh
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
alias c="cargo"
|
alias c="cargo"
|
||||||
|
|
||||||
if command-exists exa; then
|
if command-exists eza; then
|
||||||
alias ll="exa -lagHS --color-scale --icons --git"
|
alias ll="eza -lagHS --icons --git"
|
||||||
alias llt="ll --tree"
|
alias llt="ll --tree"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -53,35 +53,5 @@ install_rust_global_packages() {
|
|||||||
rust-analyzer \
|
rust-analyzer \
|
||||||
rust-src \
|
rust-src \
|
||||||
rustfmt
|
rustfmt
|
||||||
|
|
||||||
# Install or update cargo-binstall
|
|
||||||
if ! command-exists cargo-binstall; then
|
|
||||||
RUSTC_WRAPPER="${commands[sccache]}" cargo install cargo-binstall
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install sccache before the rest of the packages.
|
|
||||||
if ! command-exists sccache; then
|
|
||||||
RUSTC_WRAPPER="" cargo binstall sccache
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! command-exists cargo-quickinstall; then
|
|
||||||
RUSTC_WRAPPER=sccache cargo binstall cargo-quickinstall
|
|
||||||
fi
|
|
||||||
|
|
||||||
RUSTC_WRAPPER=sccache cargo quickinstall \
|
|
||||||
cargo-audit \
|
|
||||||
cargo-info
|
|
||||||
|
|
||||||
RUSTC_WRAPPER=sccache cargo binstall -y \
|
|
||||||
bacon \
|
|
||||||
bat \
|
|
||||||
cargo-edit \
|
|
||||||
cargo-update \
|
|
||||||
difftastic \
|
|
||||||
dirstat-rs \
|
|
||||||
exa \
|
|
||||||
gitu \
|
|
||||||
hexyl \
|
|
||||||
jwt-cli
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
2
zshenv
2
zshenv
@@ -224,6 +224,8 @@ path_prepend "$CARGO_HOME/bin"
|
|||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
if command-exists sccache; then
|
if command-exists sccache; then
|
||||||
export RUSTC_WRAPPER=sccache
|
export RUSTC_WRAPPER=sccache
|
||||||
|
else
|
||||||
|
export RUSTC_WRAPPER=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# mise setup
|
# mise setup
|
||||||
|
|||||||
Reference in New Issue
Block a user