real relative imports

This commit is contained in:
2026-07-15 18:26:28 +02:00
parent 9bbd382e10
commit af08d1888a
47 changed files with 101 additions and 124 deletions

View File

@@ -1,5 +1,5 @@
include "std/str.zr"
include "std/os.zr"
include "str.zr"
include "os.zr"
func panic[msg: str] : void
io.printf("PANIC: %s\n", msg)
@@ -7,6 +7,10 @@ func panic[msg: str] : void
_builtin_syscall(SYS_kill, os.getpid(), SIGABRT)
os.exit(1)
func assert[cond: bool, msg: str] : void
if !cond
panic(msg)
func io.printf[..] : void
s := _var_arg(0) as ptr
i := 1
@@ -133,7 +137,7 @@ func io.read_binary_file[path: str] : Blob, bool
return buf, true
func io.write_file[path: str, content: str] : bool
func io.write_text_file[path: str, content: str] : bool
return io.write_binary_file(path, content as ptr, content->len())
func io.write_binary_file[path: str, content: ptr, size: i64] : bool