Add Rust and C++ linked list implementations with build/debug configs
Rust version in src/main.rs (Cargo project) and a C++ port in cpp/main.cpp using raw pointers, both with VS Code build tasks and gdb-based debug configs. Vendors vscode-debug-visualizer and visualization as submodules for reference while building a custom node-table graph visualizer. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
57
.vscode/launch.json
vendored
Normal file
57
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Debug list_example (Rust)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/target/debug/list_example",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "/usr/bin/rust-gdb",
|
||||
"preLaunchTask": "cargo build",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug list_example (C++)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/cpp/list_example_cpp",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/cpp",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "/usr/bin/gdb",
|
||||
"preLaunchTask": "g++ build cpp/main.cpp",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Don't truncate long arrays (needed for Debug Visualizer JSON)",
|
||||
"text": "-gdb-set print elements 0",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Don't truncate long strings (needed for Debug Visualizer JSON)",
|
||||
"text": "-gdb-set print characters 0",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
35
.vscode/tasks.json
vendored
Normal file
35
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "cargo build",
|
||||
"type": "shell",
|
||||
"command": "cargo",
|
||||
"args": ["build"],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": ["$rustc"]
|
||||
},
|
||||
{
|
||||
"label": "g++ build cpp/main.cpp",
|
||||
"type": "cppbuild",
|
||||
"command": "/usr/bin/g++",
|
||||
"args": [
|
||||
"-std=c++17",
|
||||
"-g",
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"${workspaceFolder}/cpp/main.cpp",
|
||||
"-o",
|
||||
"${workspaceFolder}/cpp/list_example_cpp"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/cpp"
|
||||
},
|
||||
"group": "build",
|
||||
"problemMatcher": ["$gcc"]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user