-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpackage.json
43 lines (38 loc) · 2.66 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
"private": true,
"type": "module",
"scripts": {
"clean": "git clean -fdX",
"build-cli": "dotnet run -c Release --project ../Fable/src/Fable.Cli -- fable-raytracer.fsproj --lang rust --outDir . --noCache",
"build-js": "dotnet fable fable-raytracer.fsproj --outDir out",
"build-rust": "dotnet fable fable-raytracer.fsproj --lang rust --outDir .",
"build-rust-web": "npm run build-rust && wasm-pack build --target web",
"build-rust-node": "npm run build-rust && wasm-pack build --target nodejs",
"build-dotnet-native": "dotnet publish -c Release -r linux-x64 /p:PublishAot=True",
"build-dotnet-wasm": "dotnet publish -c Release /p:RunAOTCompilation=true /p:RuntimeIdentifier=browser-wasm",
"build-python": "dotnet fable fable-raytracer.fsproj --lang python --outDir src",
"test-js-bun": "npm run build-js && bun out/src/main.js",
"test-js-node": "npm run build-js && node out/src/main.js",
"test-rust-web": "npm run build-rust-web && npx http-server",
"test-rust-bun": "npm run build-rust-node && bun src/test_wasm.js",
"test-rust-node": "npm run build-rust-node && node src/test_wasm.js",
"test-rust-target-cpu": "npm run build-rust && cargo run --config build.rustflags='\"-C target-cpu=native\"' --release",
"test-rust": "npm run build-rust && cargo run --release",
"test-dotnet": "dotnet run -c Release",
"test-dotnet-wasm": "npm run build-dotnet-wasm && node bin/Release/net8.0/browser-wasm/AppBundle/main.mjs",
"test-dotnet-native": "npm run build-dotnet-native && bin/Release/net8.0/linux-x64/native/fable-raytracer",
"test-python": "npm run build-python && python src/main.py",
"test": "npm run test-rust && npm run test-dotnet",
"trace": "dotnet trace collect --format speedscope -- dotnet bin/Release/net8.0/fable-raytracer.dll",
"preperf": "RUSTFLAGS='-C force-frame-pointers=yes' cargo build --release",
"perf": "perf record -q -e cpu-clock -F 997 -g -- target/release/fable_raytracer",
"perf-stat": "perf stat -- target/release/fable_raytracer",
"perf-script": "perf script -F +pid | rustfilt > perf-script.perf",
"perf-report": "perf report --hierarchy | rustfilt > perf-report.log",
"perf-flamegraph": "perf script | rustfilt | ../FlameGraph/stackcollapse-perf.pl | ../FlameGraph/flamegraph.pl > perf.svg",
"flamegraph": "cargo flamegraph -c \"record -e cpu-clock -F 997 -g\"",
"heaptrack": "heaptrack target/release/fable_raytracer",
"heaptrack-print": "heaptrack_print heaptrack.*.gz -F heap_alloc.log",
"heaptrack-flamegraph": "../FlameGraph/flamegraph.pl --title \"heaptrack: allocations\" --colors mem --countname allocations < heap_alloc.log > heap_alloc.svg"
}
}