Improve isolation, execution limits and execution metrics by using Isolate (#683)

* Initial: use Isolate for isolation

* Continue: use Isolate for isolation

* Bug fixes

* timeout is wall-time for backward compatibility

* Documentation, signal names, reported time in ms

* Report memory usage in bytes

* Add privileged flags where needed

* Remove tmpfs

* Remove tmpfs

* Fix package installation

* Fix path, fix Zig: CRLF -> LF
This commit is contained in:
Omar Brikaa 2024-09-08 04:58:40 +03:00 committed by GitHub
parent 59338eee33
commit bd42fe3357
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 508 additions and 454 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# optimizing for small programs
rename 's/$/\.zig/' "$@" # Add .zig extension
zig build-exe -O ReleaseSafe --color off --cache-dir . --global-cache-dir . --name out *.zig
#!/usr/bin/env bash
# optimizing for small programs
rename 's/$/\.zig/' "$@" # Add .zig extension
zig build-exe -O ReleaseSafe --color off --cache-dir . --global-cache-dir . --name out *.zig

View file

@ -1,4 +1,4 @@
#!/usr/bin/env bash
# compiler path
export PATH=$PWD/bin:$PATH
#!/usr/bin/env bash
# compiler path
export PATH=$PWD/bin:$PATH

View file

@ -1,8 +1,9 @@
{
"language": "zig",
"version": "0.10.1",
"aliases": [],
"limit_overrides": {
"compile_timeout": 15000
}
}
{
"language": "zig",
"version": "0.10.1",
"aliases": [],
"limit_overrides": {
"compile_timeout": 15000,
"compile_cpu_time": 15000
}
}

View file

@ -1,4 +1,4 @@
#!/usr/bin/env bash
shift # Filename is only used in compile step, so we can take it out here
./out "$@"
#!/usr/bin/env bash
shift # Filename is only used in compile step, so we can take it out here
./out "$@"

View file

@ -1,6 +1,6 @@
const std = @import("std");
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
try stdout.print("OK\n", .{});
}
const std = @import("std");
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
try stdout.print("OK\n", .{});
}