Skip to content

docs: bring documentation in line with the code - #110

Merged
kolkov merged 1 commit into
mainfrom
docs/actualize-2026-10-18
Oct 24, 2026
Merged

kolkov merged 1 commit into
mainfrom
docs/actualize-2026-10-18

Conversation

@kolkov

@kolkov kolkov commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

The public docs had drifted from the code. Some of it was harmless (old file names), but some sent people the wrong way: README recommended CGO_ENABLED=1 for mixing goffi with other cgo code, which is exactly the setup that fails to link on Linux/FreeBSD (#72), and the README callback example panicked on Windows.

What changed:

  • README: the CGO_ENABLED=1 link limitation with other cgo code on Linux/FreeBSD and its workarounds; the -gcflags FreeBSD needs with CGO_ENABLED=0; Windows amd64 calls go through syscall.SyscallN, not goffi assembly; a callback example that works on Windows; reusing the avalue slice keeps calls at 0 allocs.
  • docs/ARCHITECTURE.md, docs/PERFORMANCE.md: real file names, Win64 struct and callback rules, current e2e test coverage, re-measured allocation figures, default builds are dynamically linked, not static.
  • CONTRIBUTING.md: GitHub Flow (there is no develop branch), SPDX license headers, lint on every target, golangci-lint v2 install path.
  • SECURITY.md: supported versions, pointer rules, current CI.
  • ROADMAP.md: v0.6.8 and v0.7.0 plans, libvips as a stress-test target (libvips bindings as a real-world stress test #71), current status.
  • Package docs (comments only, no code changes):
    • the ffi example compiles again (CallFunction returns the errno first);
    • the docs state that a prepared CallInterface may be shared by goroutines;
    • three callback files no longer carry // Package ffi comments, so go doc ./ffi shows the ffi.go package comment;
    • types gets a package comment.

CHANGELOG has an [Unreleased] entry.

go build ./... and go test ./... pass locally (Windows amd64). The README has no goffi version numbers, and no public file links to private paths.

@kolkov kolkov added type: docs Documentation only status: review In code review priority: low Backlog, nice to have labels Oct 24, 2026
@codecov

codecov Bot commented Oct 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

README: CGO_ENABLED=1 link limitation on Linux/FreeBSD with other cgo
code (#72) and its workarounds instead of recommending that setup;
FreeBSD -gcflags for CGO_ENABLED=0; Windows calls via syscall.SyscallN;
a callback example that works on Windows; avalue reuse for 0 allocs.

ARCHITECTURE, PERFORMANCE: real file names, Win64 struct and callback
rules, current e2e test coverage, allocation figures re-measured,
default builds are dynamic, not static.

CONTRIBUTING: GitHub Flow (no develop branch), SPDX headers, lint on
every target, golangci-lint v2 install path. SECURITY: supported
versions, pointer rules, current CI. ROADMAP: v0.6.8 and v0.7.0 plans,
libvips stress-test target (#71), current status.

Package docs: compiling ffi example, prepared CallInterface may be
shared by goroutines, callback file comments no longer become the
package comment, types package comment added.
@kolkov
kolkov force-pushed the docs/actualize-2026-10-18 branch from 5aaa7a8 to eda2484 Compare October 24, 2026 09:19
@kolkov
kolkov merged commit b9cdfd7 into main Oct 24, 2026
49 checks passed
@kolkov
kolkov deleted the docs/actualize-2026-10-18 branch October 24, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: low Backlog, nice to have status: review In code review type: docs Documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant