Initial commit: waste-rs mesh daemon, relay, and proto crates

Full Rust implementation with Ed25519 identity, X25519 ECDH handshake,
ChaCha20-Poly1305 encrypted peer connections, IPC server, and relay server.
Builds on Windows (MSVC), Linux, and macOS.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Fredrik Johansson
2026-06-21 16:32:36 +02:00
commit d2c06680f7
21 changed files with 2797 additions and 0 deletions

9
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,9 @@
{
"recommendations": [
"rust-lang.rust-analyzer",
"vadimcn.vscode-lldb",
"serayuzgur.crates",
"tamasfe.even-better-toml",
"usernamehw.errorlens"
]
}

50
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,50 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug daemon",
"cargo": {
"args": ["build", "--bin=waste-daemon", "--package=waste-daemon"],
"filter": { "name": "waste-daemon", "kind": "bin" }
},
"args": [
"--alias", "local-dev",
"--peer-port", "17338",
"--ipc-port", "17337"
],
"env": { "RUST_LOG": "debug" },
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug daemon (with relay)",
"cargo": {
"args": ["build", "--bin=waste-daemon", "--package=waste-daemon"],
"filter": { "name": "waste-daemon", "kind": "bin" }
},
"args": [
"--alias", "local-dev",
"--peer-port", "17338",
"--ipc-port", "17337",
"--relay", "127.0.0.1:17339"
],
"env": { "RUST_LOG": "debug" },
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug relay",
"cargo": {
"args": ["build", "--bin=waste-relay", "--package=waste-relay"],
"filter": { "name": "waste-relay", "kind": "bin" }
},
"args": ["--bind", "127.0.0.1:17339"],
"env": { "RUST_LOG": "debug" },
"cwd": "${workspaceFolder}"
}
]
}

15
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,15 @@
{
"rust-analyzer.linkedProjects": ["./Cargo.toml"],
"rust-analyzer.checkOnSave.command": "clippy",
"rust-analyzer.cargo.features": "all",
"editor.formatOnSave": true,
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"files.watcherExclude": {
"**/target/**": true
},
"search.exclude": {
"**/target": true
}
}

38
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,38 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "cargo build (all)",
"type": "shell",
"command": "cargo build --workspace",
"group": { "kind": "build", "isDefault": true },
"problemMatcher": ["$rustc"],
"presentation": { "reveal": "always", "panel": "shared" }
},
{
"label": "cargo clippy",
"type": "shell",
"command": "cargo clippy --workspace -- -D warnings",
"group": "test",
"problemMatcher": ["$rustc"]
},
{
"label": "run relay (local)",
"type": "shell",
"command": "RUST_LOG=debug cargo run --bin waste-relay -- --bind 127.0.0.1:17339",
"presentation": { "reveal": "always", "panel": "dedicated", "group": "runtime" }
},
{
"label": "run daemon (peer A)",
"type": "shell",
"command": "RUST_LOG=debug cargo run --bin waste-daemon -- --alias peer-a --peer-port 17338 --ipc-port 17337 --data-dir /tmp/waste-a",
"presentation": { "reveal": "always", "panel": "dedicated", "group": "runtime" }
},
{
"label": "run daemon (peer B)",
"type": "shell",
"command": "RUST_LOG=debug cargo run --bin waste-daemon -- --alias peer-b --peer-port 17340 --ipc-port 17341 --data-dir /tmp/waste-b",
"presentation": { "reveal": "always", "panel": "dedicated", "group": "runtime" }
}
]
}