use input

pub fn main(world: World) -> Void raises [NotFound, TooLarge, Io] {
    let fs: Fs = std.fs.host()
    check seed(fs)
    var storage: [64]u8 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    var alloc: FixedBufAlloc = std.mem.fixedBufAlloc(storage)
    let arg_path: Maybe<String> = std.args.get(1)
    var path: String = ".zero/zero-hash-input.txt"
    if arg_path.has {
        path = arg_path.value
    }
    let body: Maybe<owned<ByteBuf>> = std.fs.readAll(alloc, fs, path, 64)
    if body.has {
        var buf: owned<ByteBuf> = body.value
        let bytes: MutSpan<u8> = std.mem.bufBytes(&buf)
        let checksum: u32 = std.codec.crc32Bytes(bytes)
        if checksum == 1120241454 {
            check world.out.write("zero-hash ok\n")
        }
    }
}
