ww: implement package initialization

This commit is contained in:
2026-08-14 19:02:35 +09:00
parent 72e890d5aa
commit c6bec0914d
24 changed files with 5279 additions and 1009 deletions

View File

@@ -10,7 +10,7 @@ package random;
export type random = u64;
// Mirrors Hare's random::init.
export fn init(seed: u64) random = { return seed: random; };
export fn fromseed(seed: u64) random = { return seed: random; };
// SplitMix64, per Hare's random::next.
export fn next(r: *random) u64 = {