User Tools

Site Tools


general:rust

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
general:rust [2024/09/21 19:10] – [Script to update after verifying GPG signatures] sunkangeneral:rust [2025/05/09 09:54] (current) sunkan
Line 155: Line 155:
  
 # Remove previously installed rustlibs # Remove previously installed rustlibs
-find /usr/local/rust/lib/rustlib -depth -mindepth 1 -maxdepth 1 -type d \! -name $TARGET \! -name 'etc' \! -name 'src' | xargs rm -r+find /usr/local/rust/lib/rustlib -depth -mindepth 1 -maxdepth 1 -type d \! -name $TARGET \! -name 'etc' \! -name 'src' | xargs --no-run-if-empty rm -r
  
 tar xaf $RUST_FILE tar xaf $RUST_FILE
Line 179: Line 179:
 done done
  
-read -p "Keep the downloaded archives? (y/n) " keep_archives+read -p "Keep the downloaded archives? (y/N) " keep_archives
  
-if [ $keep_archives = "y" -o $keep_archives = "Y" ]; then+if [ ${keep_archives}X = "yX" -o ${keep_archives}X = "YX" ]; then
     mv $tmpdir/$RUST_FILE $TMPDIR_BASE     mv $tmpdir/$RUST_FILE $TMPDIR_BASE
     mv $tmpdir/$RUST_FILE.asc $TMPDIR_BASE     mv $tmpdir/$RUST_FILE.asc $TMPDIR_BASE
Line 285: Line 285:
 </code> </code>
  
 +====== User cargo config ======
 +~/.cargo/config.toml
 +<code>
 +[target.'cfg(target_os = "linux")']
 +rustflags = ["-C", "link-arg=-fuse-ld=mold"]
 +
 +[profile.profiling]
 +inherits = "release"
 +debug = true
 +</code>
 +
 +To build release with debug info: ''cargo build --profile profiling''
 +
 +=====  Remap source names in output =====
 +~/.cargo/config.toml
 +<code>
 +[build]
 +rustflags = ["--remap-path-prefix=/home/<username>/.cargo=cargo"]
 +</code>
general/rust.1726945819.txt.gz · Last modified: 2024/09/21 19:10 by sunkan

Donate Powered by PHP Valid HTML5 Valid CSS Run on Debian Driven by DokuWiki