repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

cargo: mold linker for lnx

1953fe8349a231ab1899507497ea9b514620e647

Oliver Jan Krylow <olver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (5)

COMMANDS.md

Modified
1 1 ## Commands to remember
3 +- sbyte: byte editor cli
3 4 - cbs: copy and paste
4 5 - ouch: compress and decompress archives
6 +- choose: `choose` sections from each line of files
5 7 - sd: search and replace
6 8 - diskonaut: explore file system visually for large files
7 9 - btm (bottom): system overview

cargo/config.toml

Modified
9 9 [profile.release]
10 10 # link time optimization is slow, but allows inter-crate analysis
11 11 lto = "fat"
13 +# use the fastest known linker out there (2022)
14 +[target.x86_64-unknown-linux-gnu]
15 +# not sure why that is necessary, but without it, rustc seems to pass wrong arguments to mold.
16 +linker = "clang"
17 +rustflags = ["-C", "link-arg=--ld-path=/usr/bin/mold"]

nushell/env.nu

Modified
1 1 # GLOBAL VARIABLES
3 3 let-env WIN32? = $nu.os-info.name =~ "windows"
4 -let-env NURC_DIR = ($nu.config-path| path expand | path dirname)
5 -let-env DOTFILES = ($env.NURC_DIR| path join ".." | path expand)
6 -let-env WORKSPACE = if $env.WIN32? { "W:/" } else { "~/Workspace" }
7 -let-env CARGO_HOME = if $env.WIN32? { "C:/Users/okr/.cargo" } else { "~/.cargo" }
4 +let-env NURC_DIR = ( $nu.config-path | path expand | path dirname )
5 +let-env DOTFILES = ( $env.NURC_DIR | path join ".." | path expand )
6 +let-env WORKSPACE = if $env.WIN32? { "W:/" } else { "~/Workspace" | path expand }
7 +let-env CARGO_HOME = ( "~/.cargo" | path expand )
9 9 # Specifies how environment variables are:
10 10 # - converted from a string to a value on Nushell startup (from_string)

tools/cargo-tools.nu

Modified
12 12 ["cbs" "cbs" []]
13 13 ["ouch" "ouch" []]
14 14 ["fd-find" "fd" []]
15 + ["choose", "choose", []]
15 16 ["ripgrep" "rg" []]
16 17 ["onefetch" "onefetch" []]
17 18 ["eva" "eva" []]

topgrade/topgrade.linux.toml

Modified
33 33 arguments = "--ff --rebase --autostash"
35 35 # Commands to run before anything
36 -#[pre_commands]
37 -#"Emacs Snapshot" = "rm -rf ~/.emacs.d/elpa.bak && cp -rl ~/.emacs.d/elpa ~/.emacs.d/elpa.bak"
36 +[pre_commands]
37 +"00 - Create BTRFS snapshot" = "echo TODO"
39 39 # Custom commands
40 40 [commands]
42 42 # Updating my configuration files
43 43 "00 - Refresh Dotfiles" = "java ~/Workspace/dotfiles/bootstripper.java ~/Workspace/dotfiles"
45 +# install tools from cargo, that are not already in path
46 +# TODO: this could be annoying when setting up a machine first time?
47 +"01 - Install Cargo Tools" = "nu W:/dotfiles/tools/cargo-tools.nu"
45 49 # Leider scheint der eingebaute "tldr" step von topgrade nicht für meine Version von TLDR funktionieren
46 -"01 - TLDR" = "tldr --update"
50 +"03 - TLDR" = "tldr --update"
48 52 # Dateisystem-Indexer ix erfrischen
49 -"02 - Indexa Update" = "ix --update"
53 +"03 - Indexa Update" = "ix --update"