1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2026-01-29 09:06:58 +00:00
zap/examples
renerocksai a0f67ffc6e
Update to Zig 0.16.0-dev (master) compatibility
Adapt codebase to breaking API changes in Zig 0.16.0-dev:

std.Io introduction:
- std.io namespace renamed to std.Io (capitalization)
- std.http.Client now requires io field
- Create std.Io.Threaded at entry points, pass io to functions
- Use std.Io.Writer.fixed() for fixed buffer writers
- Use std.Io.Dir.cwd().access(io, ...) for file access checks

Sleep API:
- std.Thread.sleep / std.time.sleep removed
- Use std.posix.nanosleep(seconds, nanoseconds) instead

JSON API:
- std.json.stringify() -> std.json.Stringify.value()

Time API:
- std.time.nanoTimestamp() removed
- Use std.time.Instant.now() with .since() for durations

File API:
- readFileAlloc parameter order changed, uses std.Io.Limit

Debug API:
- std.debug.writeStackTrace signature changed (removed debugInfo)
- Capture traces by pointer with |*trace| pattern

Refactored Io pattern in tests/examples to create Threaded once
at entry points and pass io: std.Io to helper functions, following
Zig's new convention of treating Io like allocators.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-06 16:11:10 +01:00
..
accept 0.15.1-fix accept example 2025-08-28 22:38:51 +02:00
app Update to Zig 0.16.0-dev (master) compatibility 2025-12-06 16:11:10 +01:00
bindataformpost 0.15.1-fix bindataformpost example 2025-08-28 22:36:00 +02:00
cookies Update to Zig 0.16.0-dev (master) compatibility 2025-12-06 16:11:10 +01:00
endpoint 0.15.1-fix endpoint example 2025-08-28 22:03:43 +02:00
endpoint_auth endpoints, auth endpoints, middleware endpoints: eliminate need for empty stubs 2025-07-23 20:23:49 +02:00
hello added header to example main source files showing how to build & run 2025-03-30 19:40:08 +02:00
hello2 added header to example main source files showing how to build & run 2025-03-30 19:40:08 +02:00
hello_json added header to example main source files showing how to build & run 2025-03-30 19:40:08 +02:00
http_params Update to Zig 0.16.0-dev (master) compatibility 2025-12-06 16:11:10 +01:00
https Update to Zig 0.16.0-dev (master) compatibility 2025-12-06 16:11:10 +01:00
middleware harmonize callback function error handling, zap logging; doc updates 2025-04-01 16:30:24 +02:00
middleware_with_endpoint endpoints, auth endpoints, middleware endpoints: eliminate need for empty stubs 2025-07-23 20:23:49 +02:00
mustache harmonize callback function error handling, zap logging; doc updates 2025-04-01 16:30:24 +02:00
routes added header to example main source files showing how to build & run 2025-03-30 19:40:08 +02:00
senderror added header to example main source files showing how to build & run 2025-03-30 19:40:08 +02:00
sendfile harmonize callback function error handling, zap logging; doc updates 2025-04-01 16:30:24 +02:00
serve added header to example main source files showing how to build & run 2025-03-30 19:40:08 +02:00
simple_router added header to example main source files showing how to build & run 2025-03-30 19:40:08 +02:00
userpass_session_auth harmonize callback function error handling, zap logging; doc updates 2025-04-01 16:30:24 +02:00
websockets 0.15.1-fix websockets example 2025-08-28 22:31:12 +02:00