http server

This commit is contained in:
2026-07-07 19:40:25 +02:00
parent aea9ce911a
commit 9bbd382e10
13 changed files with 178 additions and 97 deletions

View File

@@ -1,4 +1,4 @@
include "std/core.zr"
include "std/io.zr"
func i64.abs[n: i64] : i64
if n == -9223372036854775808
@@ -97,6 +97,16 @@ func i64.to_hex_str_buf[n: i64, buf: ptr] : void
buf[len] = 0
func i64.to_str[n: i64] : str
out := mem.alloc(21)
n->to_str_buf(out)
return out as str
func i64.to_hex_str[n: i64] : str
out := mem.alloc(17)
n->to_hex_str_buf(out)
return out as str
func f64.to_str_buf[x: i64, buf: ptr] : void
bits := x
sign := (bits >> 63) & 1