docs(lib): preload-gate example + Library mode README section#58
Merged
Conversation
Adds examples/preload-gate — a complete, runnable program using pkg/bpfcompat.ValidateBeforeLoad as a bpfman-style pre-load gate (real load on the node's own kernel, no VM). New README "Library mode" section embeds the program and a real pass/blocked run (screenshots), and links the working package source + pkg/bpfcompat/README.md. Bumps the stale install VER to v0.2.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses two things:
"Library mode" was missing from the README and the Go import path had no working destination (people clicking
github.com/kernel-guard/bpfcompat/pkg/bpfcompator pkg.go.dev hit a 404 — it's a module path, not a web URL, and pkg.go.dev hasn't indexed it). Fixed by adding a Library mode section that links the real, browsable package source (/tree/main/pkg/bpfcompat, 200) andpkg/bpfcompat/README.md.A real program using library mode, with screenshots. New runnable
examples/preload-gate— a bpfman-style pre-load gate built onValidateBeforeLoad(real load on the node's own kernel, no VM). The README section embeds:Both screenshots are from actual runs on this host (kernel
6.17.0-35-generic).Also bumps the stale install
VER=v0.1.6→v0.2.0.go build ./...green;examples/preload-gatebuilds with and without-tags hostloadand runs as shown.🤖 Generated with Claude Code