An SMTP client and server library for Zig implementing RFC 5321.
0

Configure Feed

Select the types of activity you want to include in your feed.

Add Forgejo workflow to publish the API docs

zig build docs emits the autodoc bundle for the zsmtp module into
zig-out/docs, and the workflow publishes it to
https://jeff.ocj.page/zsmtp/ with git-pages-cli (now in the devshell)
on every push to main, mirroring the notmuch.zig setup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012HBHFhoTYa8TU9GLwobfbx

+37
+14
build.zig
··· 126 126 run_cmd.addArgs(args); 127 127 } 128 128 129 + const lib = b.addLibrary(.{ 130 + .name = "zsmtp", 131 + .root_module = mod, 132 + }); 133 + 134 + const install_docs = b.addInstallDirectory(.{ 135 + .source_dir = lib.getEmittedDocs(), 136 + .install_dir = .prefix, 137 + .install_subdir = "docs", 138 + }); 139 + 140 + const docs_step = b.step("docs", "Build the API docs"); 141 + docs_step.dependOn(&install_docs.step); 142 + 129 143 // The is_email address corpus test embeds its XML test files from the 130 144 // lazy isemail dependency, fetched only on demand: 131 145 // zig build test -Disemail-corpus
+1
flake.nix
··· 59 59 default = pkgs.mkShell { 60 60 name = "zsmtp"; 61 61 nativeBuildInputs = [ 62 + pkgs.git-pages-cli 62 63 pkgs.kcov 63 64 pkgs.radicle-node 64 65 pkgs.reuse
+22
.forgejo/workflows/publish.yaml
··· 1 + # SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us> 2 + # SPDX-License-Identifier: MIT 3 + 4 + name: Publish docs 5 + 6 + on: 7 + push: 8 + branches: 9 + - main 10 + 11 + jobs: 12 + publish: 13 + runs-on: nixos 14 + steps: 15 + - name: Checkout 16 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 17 + 18 + - name: Build docs 19 + run: nix develop -c zig build docs 20 + 21 + - name: Publish docs 22 + run: nix develop -c git-pages-cli https://jeff.ocj.page/zsmtp/ --server ocj.page --token ${{ forge.token }} --upload-dir zig-out/docs