Initial commit

This commit is contained in:
unknown
2026-05-14 00:42:39 +02:00
commit dae8a0a4a1
37 changed files with 1226 additions and 0 deletions

36
payload/build_payload.ps1 Normal file
View File

@@ -0,0 +1,36 @@
param(
[ValidateSet("debug", "release", "size")]
[string]$mode = "size",
[ValidateSet("native", "c", "js_node", "go")]
[string]$target = "c",
[ValidateSet("build", "run")]
[string]$action = "build"
)
if (-not (Test-Path "build")) {
New-Item -ItemType Directory -Path "build" | Out-Null
}
if ($mode -eq "debug") {
v -g -cg -b $target -enable-globals -o build/nude_bug .
}
elseif ($mode -eq "release") {
v -prod -cflags "-O3" -Wfatal-errors -enable-globals -q -skip-unused -b $target -o build/nude_release .
}
elseif ($mode -eq "size") {
v -prod -cflags "-Os -s" -Wfatal-errors -enable-globals -q -skip-unused -b $target -o build/nude_optimized .
}
$exe = switch ($mode) {
"debug" { "nude_bug.exe" }
"release" { "nude_release.exe" }
"size" { "nude_optimized.exe" }
}
$v_output = Join-Path -Path "build" -ChildPath $exe
if ($action -eq "run") {
& $v_output
}