Skip to content

docs(zig): document safe-wrapper surface and raw-only scope (#412) - #421

Merged
gg582 merged 1 commit into
c4punks:devfrom
Bhumika-1432006:docs/zig-surface
Oct 19, 2026
Merged

gg582 merged 1 commit into
c4punks:devfrom
Bhumika-1432006:docs/zig-surface

Conversation

@Bhumika-1432006

Copy link
Copy Markdown
Contributor

Closes #412 (documentation component: README states the supported surface).

The issue asks for Zig-to-Rust wrapper parity or an explicit raw-only
statement. This PR delivers the explicit statement; wrapper parity for
db, scheduler, jwt, etc. is left for follow-on PRs.

What changed in bindings/zig/README.md:

  • Safe-wrapper surface table: every exported symbol in cwist.zig
    with a one-line description, so users know exactly what the Zig
    layer covers without reading source.

  • Raw-only table: db/ORM, scheduler, JWT asymmetric algorithms,
    Redis, SipHash, sstring, arena, WebSocket, TLS socket config,
    HTTP/3/WebTransport, gRPC, and multiport listen. Each entry names
    the C header where the raw API lives so users can find it.

  • Raw access section: a short handler example calling cwist.c
    directly, showing the path while individual wrappers are pending.

Existing text (Zig version pin, build instructions, package use,
lifetimes and threading rules) is unchanged.

How it was verified: the table entries were cross-checked against the
public symbols in src/cwist.zig and the raw-only list against the
v4.0 API baseline (docs/api/v4.0-api-baseline.txt) for headers not
referenced anywhere in cwist.zig.

🤖 Generated with Claude Code

)

The bindings/zig README listed what the Zig layer wraps but did not
catalog what is raw-only, which is one of the acceptance criteria in
issue c4punks#412.

What this adds to bindings/zig/README.md:

- "Safe-wrapper surface" table: every exported symbol in cwist.zig
  with a one-line description.
- "Raw-only (not yet wrapped)" table: db/ORM, scheduler, JWT
  asymmetric algorithms, Redis, SipHash, sstring, arena, WebSocket,
  TLS config, HTTP/3/WebTransport, gRPC, multiport listen -- each
  entry names the C header where the raw API lives.
- "Raw access" section: a short example of calling cwist.c from a
  Zig handler so users know the path while wrappers are pending.

The existing text (Zig version, build instructions, package use,
lifetimes/threading rules) is kept unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gg582

gg582 commented Oct 19, 2026

Copy link
Copy Markdown
Member

Zig binding is easy enough. I guess your verification is quite cool but developing Zig binding for CWIST can be done easily(if you know Zig) 😄

For example we can do it by ourselves after learning Zig. Let's start with it

@gg582
gg582 merged commit a5bb891 into c4punks:dev Oct 19, 2026
26 checks passed
@gg582

gg582 commented Oct 19, 2026

Copy link
Copy Markdown
Member

Plus, we don't need verification for mere documents too. I read its content.

gg582 pushed a commit that referenced this pull request Oct 20, 2026
)

The bindings/zig README listed what the Zig layer wraps but did not
catalog what is raw-only, which is one of the acceptance criteria in
issue #412.

What this adds to bindings/zig/README.md:

- "Safe-wrapper surface" table: every exported symbol in cwist.zig
  with a one-line description.
- "Raw-only (not yet wrapped)" table: db/ORM, scheduler, JWT
  asymmetric algorithms, Redis, SipHash, sstring, arena, WebSocket,
  TLS config, HTTP/3/WebTransport, gRPC, multiport listen -- each
  entry names the C header where the raw API lives.
- "Raw access" section: a short example of calling cwist.c from a
  Zig handler so users know the path while wrappers are pending.

The existing text (Zig version, build instructions, package use,
lifetimes/threading rules) is kept unchanged.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants