Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Examples

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

An enabled bounds check on array access fails at run time. Lowering emits a call to panic with a static message pointer. The process exits; callers do not receive Option because the failure is classified as a programmer/contract fault, not a recoverable IO error.

A server logs to stderr after the reader closes the pipe. syscall_write returns -1 or partial failure; System.Error.Write panics with the stable stderr message defined in console IO spec. Operators treat this as fatal logging failure in v1.

Corelib (not user panic) wraps builtins:

// System.Output — simplified narrative
unit Write(string text) {
// builds WriteRequest → Syscall.WriteWith(Stdout, bytes)
// panics when syscall returns error
}

User application code should prefer Option for expected failures; reserve runtime panic for violations and v1 stream policy.

E2E tests in compiler/crates/beskid_e2e_tests/src/tests/runtime_cases.rs exercise panic and IO paths without requiring full corelib—they call lowered programs that hit builtins directly.

Input.ReadLine loops syscall_read on stdin until newline or EOF. EOF returns Result success with partial/empty string; it does not call panic (IO-005 sibling spec).