Last active
September 14, 2025 20:20
-
-
Save 3DRaven/bbb81cbeeb1e5d208834ce18782e119f to your computer and use it in GitHub Desktop.
Revisions
-
3DRaven revised this gist
Sep 14, 2025 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,6 +37,8 @@ }, "rust-analyzer.lru.capacity": 1024, "rust-analyzer.cachePriming.enable": true, "rust-analyzer.cachePriming.numThreads": 12, "rust-analyzer.numThreads": 12, "rust-analyzer.checkOnSave": true, "rust-analyzer.check.workspace": true, "rust-analyzer.check.allTargets": true, -
3DRaven revised this gist
Sep 14, 2025 . 1 changed file with 17 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -213,4 +213,20 @@ codegen-units = 1 } ``` important setting is `sourceLanguages` # Better extensions for vscode 1. CodeLLDB 2. ANSI colors 3. Better Comments 4. CodeViz Stat 5. Dependi 6. Error lens 7. Even better Toml 8. Log File Highlighter - tail functions 9. Meramaid chart 10. Open file 11. Rust mod generator 12. rust-analyzer 13. Code spell checker -
3DRaven revised this gist
Sep 14, 2025 . 1 changed file with 30 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -184,4 +184,33 @@ incremental = true [profile.release] lto = "thin" codegen-units = 1 ``` # launch.json in project in vscode ```json { "version": "0.2.0", "configurations": [ { "name": "Debug", "type": "lldb", "request": "launch", "program": "${workspaceRoot}/target/debug/project", "args": [], "env": { "RUST_BACKTRACE": "1", "RUST_LOG": "debug,h2=info,tower_http=debug" }, "cwd": "${workspaceRoot}", "stopOnEntry": false, "preLaunchTask": "rust: cargo build", "sourceLanguages": [ "rust" ] } ] } ``` important setting is `sourceLanguages` -
3DRaven revised this gist
Sep 14, 2025 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -108,13 +108,13 @@ ``` # cat /etc/sysctl.d/99-rust-dev.conf ``` vm.swappiness=1 vm.vfs_cache_pressure=50 vm.dirty_ratio=15 vm.dirty_background_ratio=5 vm.max_map_count=2097152 ``` # swap (as I remember it, check) ## For ubuntu 25.10, installation steps -
3DRaven revised this gist
Sep 14, 2025 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -163,11 +163,11 @@ WantedBy=local-fs-pre.target ## install sccache `cargo install sccache` ## Add sccache as wraper around rustc `nano ~/.cargo/config.toml` ```toml [build] jobs = 12 # 3/4 CPU kernels -
3DRaven revised this gist
Sep 14, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -121,7 +121,7 @@ vm.max_map_count=2097152 ### Compressed RAM `sudo apt install zram-config` ### Compressed swap volume ```sh -
3DRaven revised this gist
Sep 14, 2025 . 2 changed files with 187 additions and 69 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,187 @@ # Base system 16Gb RAM laptop with 16 cpu kernels # settings.json for vscode in project ```json { // "rust-analyzer.completion.limit": 10, // "rust-analyzer.workspace.symbol.search.limit": 50, "rust-analyzer.workspace.symbol.search.scope": "workspace_and_dependencies", "rust-analyzer.imports.preferPrelude": true, "rust-analyzer.imports.preferNoStd": false, "rust-analyzer.imports.merge.glob": false, "rust-analyzer.imports.granularity.group": "crate", "rust-analyzer.imports.granularity.enforce": false, "rust-analyzer.hover.actions.enable": true, "rust-analyzer.hover.actions.implementations.enable": true, "rust-analyzer.hover.actions.references.enable": true, "rust-analyzer.hover.actions.run.enable": false, "rust-analyzer.hover.actions.debug.enable": false, "rust-analyzer.completion.privateEditable.enable": true, "rust-analyzer.diagnostics.experimental.enable": false, "rust-analyzer.diagnostics.enable": true, "rust-analyzer.lens.enable": true, "rust-analyzer.check.command": "check", "rust-analyzer.runnables.extraTestBinaryArgs": [ "--nocapture", "--test-threads=1" ], "rust-analyzer.cargo.features": "all", "rust-analyzer.completion.autoself.enable": true, "rust-analyzer.completion.autoimport.enable": true, "rust-analyzer.server.extraEnv": { "CARGO_TARGET_DIR": "target/rust-analyzer", "RA_PROFILE": "IntelliJ" }, "rust-analyzer.lru.capacity": 1024, "rust-analyzer.cachePriming.enable": true, "rust-analyzer.checkOnSave": true, "rust-analyzer.check.workspace": true, "rust-analyzer.check.allTargets": true, "rust-analyzer.cargo.buildScripts.enable": true, "rust-analyzer.procMacro.enable": true, // "rust-analyzer.check.extraArgs": [ // // "--lib", // "--bins" // ], ///////////////////////// "editor.hover.sticky": true, "editor.hover.delay": 100, "editor.hover.enabled": true, "editor.parameterHints.cycle": true, "editor.suggest.filterGraceful": false, "editor.gotoLocation.multipleDefinitions": "goto", "editor.gotoLocation.multipleTypeDefinitions": "goto", "editor.gotoLocation.multipleImplementations": "peek", "editor.gotoLocation.multipleReferences": "peek", "editor.inlineSuggest.enabled": true, "editor.peekWidgetDefaultFocus": "editor", "search.searchOnType": true, "search.searchOnTypeDebouncePeriod": 300, "files.watcherExclude": { "**/target/**": true, "**/node_modules/**": true, "**/.git/objects/**": true, "**/.git/subtree-cache/**": true, "**/build/**": true, "**/dist/**": true }, "search.exclude": { "**/target": true, "**/node_modules": true, "**/.git": true }, "editor.minimap.enabled": false, "breadcrumbs.enabled": true, "editor.renderWhitespace": "none", "editor.renderControlCharacters": true, "editor.renderLineHighlight": "all", "problems.decorations.enabled": true, "editor.quickSuggestions": { "other": true, "comments": true, "strings": true }, "editor.quickSuggestionsDelay": 100, "editor.suggest.insertMode": "replace", "editor.suggest.localityBonus": true, "editor.suggest.shareSuggestSelections": false, "git.enabled": false, "git.autorefresh": false, "git.decorations.enabled": false, "terminal.integrated.gpuAcceleration": "auto", ///////////////////////// "lldb.displayFormat": "auto", "lldb.showDisassembly": "never", "lldb.dereferencePointers": true, "lldb.consoleMode": "evaluate", "java.autobuild.enabled": false, "java.errors.incompleteClasspath.severity": "ignore", "java.server.launchMode": "LightWeight", "java.project.sourcePaths": [ "client" ], "markdown-preview-enhanced.plantumlJarPath": "/home/i3draven/fun/Rust/degu/tools/plantuml.jar" } ``` # cat /etc/sysctl.d/99-rust-dev.conf vm.swappiness=1 vm.vfs_cache_pressure=50 vm.dirty_ratio=15 vm.dirty_background_ratio=5 vm.max_map_count=2097152 # swap (as I remember it, check) ## For ubuntu 25.10, installation steps ### Compressed RAM sudo apt install zram-config ### Compressed swap volume ```sh sudo apt install vdo lvm2 sudo systemctl enable vdo.service sudo systemctl start vdo.service sudo lvcreate --type vdo -L 31G -V 31G --compression y --deduplication n vg/lv_swap sudo mkswap /dev/vg/lv_swap sudo blkid /dev/vg/lv_swap ``` ### /etc/fstab ``` #/swapfile none swap sw 0 0 UUID=${your_swap_id} none swap sw 0 0 ``` #### LMV volume starts before fstab sudo systemctl edit dev-vg-lvol0-swap.service ``` toml [Unit] Description=Activate LVM volumes before mounting filesystems DefaultDependencies=no Before=local-fs-pre.target After=systemd-udev-settle.service [Service] Type=oneshot ExecStart=/usr/sbin/vgchange -ay [Install] WantedBy=local-fs-pre.target ``` # Cargo preferences ## install sccache cargo install sccache ## Add sccache as wraper around rustc nano ~/.cargo/config.toml ```toml [build] jobs = 12 # 3/4 CPU kernels rustc-wrapper = "sccache" [target.x86_64-unknown-linux-gnu] linker = "clang" rustflags = ["-C", "link-arg=-fuse-ld=lld"] [profile.dev] debug = 1 incremental = true [profile.release] lto = "thin" codegen-units = 1 ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,69 +0,0 @@ -
3DRaven renamed this gist
Sep 4, 2025 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
3DRaven revised this gist
Sep 4, 2025 . No changes.There are no files selected for viewing
-
3DRaven created this gist
Sep 4, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,69 @@ { "rust-analyzer.lens.enable": true, "rust-analyzer.check.command": "check", "rust-analyzer.runnables.extraTestBinaryArgs": [ "--nocapture", "--test-threads=1" ], "rust-analyzer.cargo.allTargets": true, "rust-analyzer.cargo.features": "all", "rust-analyzer.completion.autoself.enable": true, "rust-analyzer.completion.autoimport.enable": true, "rust-analyzer.server.extraEnv": { "CARGO_TARGET_DIR": "target/rust-analyzer", "RA_PROFILE": "IntelliJ" }, "rust-analyzer.lru.capacity": 1024, "rust-analyzer.cachePriming.enable": true, "rust-analyzer.checkOnSave": true, "rust-analyzer.cargo.buildScripts.enable": true, "rust-analyzer.procMacro.enable": true, ///////////////////////// "editor.gotoLocation.multipleDefinitions": "goto", "editor.gotoLocation.multipleTypeDefinitions": "goto", "editor.gotoLocation.multipleImplementations": "peek", "editor.gotoLocation.multipleReferences": "peek", "editor.inlineSuggest.enabled": true, "editor.peekWidgetDefaultFocus": "editor", "search.searchOnType": true, "search.searchOnTypeDebouncePeriod": 300, "files.watcherExclude": { "**/target/**": true, "**/node_modules/**": true, "**/.git/objects/**": true, "**/.git/subtree-cache/**": true, "**/build/**": true, "**/dist/**": true }, "search.exclude": { "**/target": true, "**/node_modules": true, "**/.git": true }, "editor.minimap.enabled": true, "breadcrumbs.enabled": true, "editor.renderWhitespace": "all", "editor.renderControlCharacters": true, "editor.renderLineHighlight": "all", "editor.hover.delay": 1000, "problems.decorations.enabled": true, "editor.quickSuggestions": { "other": true, "comments": true, "strings": true }, "editor.quickSuggestionsDelay": 100, "editor.suggest.insertMode": "replace", "editor.suggest.localityBonus": true, "editor.suggest.shareSuggestSelections": false, "git.enabled": false, "git.autorefresh": false, "git.decorations.enabled": false, "terminal.integrated.gpuAcceleration": "auto", "terminal.integrated.rendererType": "auto", ///////////////////////// "lldb.displayFormat": "auto", "lldb.showDisassembly": "never", "lldb.dereferencePointers": true, "lldb.consoleMode": "evaluate" }