2.0 KiB
2.0 KiB
Beta.2 Runtime Resource Foundation Scope
This file tracks the first post-1.0.0-beta.1 runtime/resource foundation
slice. It is main-branch work intended for a future 1.0.0-beta.2 bundle.
Implemented In This Slice
std.fs.open_text_read_result : (string) -> (result i32 i32)opens a text file for read-only resource-handle flow.std.fs.read_open_text_result : (i32) -> (result string i32)reads remaining text from an open read handle.std.fs.close_result : (i32) -> (result i32 i32)closes an open resource handle.lib/std/fs.sloexposes matching explicit source facade helpers:open_text_read_result,read_open_text_result,close_result,read_text_via_handle_result, andclose_ok.- Glagol lowers the new calls to private runtime symbols and keeps the existing
concrete
resultfamilies. - The test runner and hosted C runtime both enforce the same basic policy:
invalid, missing, closed, or exhausted ordinary host failures return
err 1instead of panicking.
Resource Policy
- Resource handles are positive
i32tokens owned by the current process. - Handles are opaque Slovo values, not host file descriptors and not stable ABI values.
- A handle is valid only until
std.fs.close_resultsucceeds. - Reading a closed or invalid handle returns
err 1. - Closing a closed or invalid handle returns
err 1. - Resource cleanup is explicit in this beta slice; no finalizer, destructor, ownership transfer, or affine typing rule is claimed.
Explicitly Out Of Scope
- no writable file handles
- no binary IO
- no directory handles
- no process handles
- no sockets or networking
- no async/event-loop resource model
- no platform-specific error codes
- no rich host-error ADT
- no stable handle ABI/layout guarantee
Release Gate
- focused resource/host tests must pass
- focused
std.fssource facade tests must pass - promotion-gate std facade alignment must pass
- full release gate must pass before tagging
1.0.0-beta.2