Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Contracts and edge cases

Platform spec article

Contracts and edge cases

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki
IDRequirement
IO-ABI-001panic and panic_str must not return to callers; lowering must treat sites as unreachable after call.
IO-ABI-002JIT and AOT must import the same syscall_read / syscall_write symbols from beskid_abi.
IO-ABI-003Non-Linux targets may implement syscalls via host shims but must preserve signatures and error sentinels.
IO-ABI-004syscall_write must accept fd as i64 and string as BeskidStr pointer per BUILTIN_SPECS.
IO-ABI-005Front-end/lowering must not emit raw OS syscall instructions for corelib IO.
IO-ABI-006User docs must not document internal mangled panic entrypoints; stable names are panic / panic_str.
BuiltinContract
panic(msg_ptr, msg_len)Diverging; UTF-8 bytes at msg_ptr for msg_len
panic_str(handle)Diverging; BeskidStr handle
syscall_write(fd, str)Returns bytes written or -1
syscall_read(fd, max)Returns new BeskidStr handle
CaseBehavior
Zero-length writeReturns 0 without syscall when possible
Invalid fdReturns -1; corelib may panic on stdout/stderr
Partial write on pipeLoop until complete or error (Linux path)
Panic during another panicProcess abort; no nested recovery
Redirected stdoutStill fd=1; TTY detection is corelib-only