sonic
AGENTS.md9.6k starsChanged 21 months agoApache-2.0View on GitHub
Sonic is a Go JSON library with JIT, SIMD, and native-code acceleration. Public APIs live at the repository root and in ast/, decoder/, encoder/, option/, unquote/, and utf8/. Implementation details live under internal/, including JIT, native dispatch, runtime helpers, caching, and encoder/decoder internals. C sources are in native/; generated Go native wrappers are under internal/native/. The workspace in go.work includes the root module plus compatibility/, external_jsonlib_test/, fuzz/, generic_test/, issue_test/, and loader/. Test data and examples live in testdata/, examples/, fuzz/corpus/,…
Trending
More talk lately.about the whole repository
Who's talking about bytedance/sonic
- A Hacker News story“Sonic: A fast JSON serializing and deserializing library”Hacker News · Nov 21, 2021 · 98 points
- Homebrew/homebrew-core“go 1.26.0, go@1.25 1.25.7 (new formula)”GitHub · Dec 16, 2025 · 12 reactions
- Homebrew/homebrew-core“go 1.25.0, go@1.24 1.24.6 (new formula)”GitHub · Jun 12, 2025 · 11 reactions
- chenzhuoyu/iasm“v0.9.0: unknown revision ”GitHub · Sep 10, 2024 · 9 reactions
- gin-gonic/gin“random bytedance dependency (potentially) injected into `github.com/gin-gonic/gin/internal/json`”GitHub · Aug 30, 2025 · 6 reactions
The biggest 5 of 58 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 58
Talked about on GitHub, Hacker News, Bluesky and Stack Overflow (58 times).
On GitHub · 50
- Dec 16, 2025go 1.26.0, go@1.25 1.25.7 (new formula) — Homebrew/homebrew-core12 reactions · 10 comments
- Jun 12, 2025go 1.25.0, go@1.24 1.24.6 (new formula) — Homebrew/homebrew-core11 reactions · 5 comments
- Sep 10, 2024v0.9.0: unknown revision — chenzhuoyu/iasm9 reactions · 9 comments
- Aug 30, 2025random bytedance dependency (potentially) injected into `github.com/gin-gonic/gin/internal/json` — gin-gonic/gin6 reactions · 2 comments
- Aug 4, 2025Support for InvokeModelWithBidirectionalStream — aws/aws-sdk-go-v25 reactions · 8 comments
45 more on GitHub
- Apr 16, 2025Feature Request: More regular releases — gin-gonic/gin4 reactions · 8 comments
- Jun 27, 2023Why bytedance/sonic? — gin-gonic/gin4 reactions · 11 comments
- May 8, 2025fix: bump sonic to v1.13.2 to avoid SIGFAULTs on arm64 architecture — erpc/erpc3 reactions · 9 comments
- Feb 25, 2025Consider using standard library for JSON marshaling — kaptinlin/jsonschema3 reactions · 1 comment
- May 7, 2024fix(deps): update module github.com/gin-gonic/gin to v1.11.0 - autoclosed — oapi-codegen/runtime3 reactions · 2 comments
- Jun 7, 2023import mapping broke between v1.12.0 and v1.13.0 — oapi-codegen/oapi-codegen3 reactions · 1 comment
- Apr 5, 2025bug: panic on request — erpc/erpc2 reactions · 2 comments
- Jan 2, 2025proxy.golang.org, cmd/go: 403 Forbidden on go get — golang/go2 reactions · 12 comments
- Sep 2, 2024link: github.com/bytedance/sonic/ast: invalid reference to encoding/json.safeSet — cloudwego/hertz2 reactions · 4 comments
- Oct 30, 2026chore(deps): bump github.com/bytedance/sonic from 1.15.4 to 1.15.5 in /crates/argis-extensions — KooshaPari/PhenoShared1 reaction · 7 comments
- Oct 26, 2026chore(deps): bump runtime-process from `64ee338` to `249ea25` — KooshaPari/ShareCLI1 reaction · 6 comments
- Oct 26, 2026chore(deps): bump substrate from `64ee338` to `249ea25` — KooshaPari/ShareCLI1 reaction · 6 comments
- Oct 26, 2026chore(all): update opentelemetry-go-contrib monorepo — GoogleCloudPlatform/golang-samples1 reaction · 1 comment
- Oct 23, 2026chore(deps): bump github.com/bytedance/sonic from 1.15.2 to 1.15.4 in /crates/argis-extensions — KooshaPari/PhenoShared1 reaction · 11 comments
- Oct 22, 2026fix: build with Go 1.26.10 for crypto/x509 security patch — babylonlabs-io/babylon1 reaction · 3 comments
- Sep 29, 2026fix(release): pin goreleaser-cross to Go 1.25 by digest, add v4.3.1-v4.5.0 changelog (backport #2035) — babylonlabs-io/babylon1 reaction · 2 comments
- Sep 29, 2026fix(release): pin goreleaser-cross to Go 1.25 by digest — babylonlabs-io/babylon1 reaction · 2 comments
- Sep 10, 2026chore(deps): bump the wasmd fork to v0.61.14-xion.3 — burnt-labs/xion1 reaction · 1 comment
- Sep 9, 2026chore(deps): bump the tokenfactory fork to v0.53.4-xion.3 — burnt-labs/xion1 reaction · 1 comment
- Sep 8, 2026build: align the Go toolchain with xion and repair CI — burnt-labs/tokenfactory1 reaction · 3 comments
- Aug 27, 2026feat: add Gotify native notification channel — SigNoz/signoz1 reaction
- Aug 27, 2026deps: Bump the "all-dependencies" group with 1 update across multiple ecosystems — cynative/cynative1 reaction
- Aug 26, 2026chore(main): release 1.10.1 — cynative/cynative1 reaction · 1 comment
- Aug 13, 2026ai 模块在 Go 1.26 下无法编译(bytedance/sonic v1.14.1 undefined: GoMapIterator) — apache/dubbo-admin1 reaction · 3 comments
- Jul 29, 2026[Bug]: `SIGILL` crash on streaming requests when host CPU lacks `PCLMULQDQ` (Nehalem-era Xeon) — maximhq/bifrost1 reaction · 1 comment
- Jul 17, 2026[Bug]: MCPToolManagerConfig.tool_execution_timeout corrupts to a negative timeout on a JSON marshal/unmarshal round trip — maximhq/bifrost1 reaction · 1 comment
- Jul 14, 2026[Bug]: Gemini streaming intermittently fails with "failed to parse Gemini stream response: Mismatch type ... with value string" when a chunk is not a JSON object — maximhq/bifrost1 reaction · 1 comment
- Jul 11, 2026Bedrock Converse: reasoning_config/thinking in additionalModelRequestFields silently dropped on cross-provider translation — fallbacks lose extended thinking — maximhq/bifrost1 reaction · 1 comment
- May 25, 2026Issues with BigInt replication — xataio/pgstream1 reaction · 2 comments
- Apr 18, 2026Unable to build the SDK — qualcomm/GenieX1 reaction · 2 comments
- Mar 31, 2026feat: Modifies Maxim plugin to support image generation requests — maximhq/bifrost1 reaction · 6 comments
- Mar 9, 2026Go 1.26.0 支持 — go-dev-frame/sponge1 reaction · 2 comments
- Oct 19, 2025GoベースのNetworkManagerを作成 — nicoryo/nicoryo-nm-api1 reaction
- Oct 14, 2025Build failure: mcphost — NixOS/nixpkgs1 reaction
- Sep 22, 2025build(deps): bump github.com/gin-gonic/gin from 1.10.0 to 1.11.0 in /packages/server/core-crm — customeros/customeros1 reaction · 1 comment
- Sep 22, 2025build(deps): bump github.com/gin-gonic/gin from 1.10.0 to 1.11.0 — customeros/leads1 reaction · 1 comment
- Sep 22, 2025build(deps): bump github.com/gin-gonic/gin from 1.10.0 to 1.11.0 in /packages/server/mailsherpa-api — customeros/customeros1 reaction · 1 comment
- Sep 22, 2025build(deps): bump github.com/gin-gonic/gin from 1.10.0 to 1.11.0 in /packages/server/customer-os-common-module — customeros/customeros1 reaction
- Sep 22, 2025build(deps): bump github.com/gin-gonic/gin from 1.10.0 to 1.11.0 in /packages/server/customer-os-webhooks — customeros/customeros1 reaction
- Sep 22, 2025build(deps): bump github.com/gin-gonic/gin from 1.10.0 to 1.11.0 in /packages/server/customer-os-api — customeros/customeros1 reaction
- Aug 25, 2025[Bug]: build issue on macos with go 1.25 — milvus-io/milvus1 reaction · 4 comments
- Jul 19, 2025[BUG] fails to build with Go 1.25 — projectdiscovery/nuclei1 reaction · 3 comments
- Jul 3, 2025Support for Go 1.25 — ignite/cli1 reaction · 2 comments
- Mar 11, 2025[Bug]: Standalone version regularly gets down on reindexing (and probably after) — milvus-io/milvus1 reaction · 14 comments
- Feb 28, 2025[BUG]: not enough arguments in call to tr.ResourceToSource — DataDog/dd-trace-go1 reaction · 16 comments
On Hacker News · 3
- Nov 21, 2021Sonic: A fast JSON serializing and deserializing library98 points · 43 comments
- Jul 5, 2023Sonic: A fast JSON serializing and deserializing library in Go3 points
- Mar 11, 2025Sonic: A blazingly fast Golang JSON serializing and deserializing1 point
On Bluesky · 3
- Feb 10, 2025A fast JSON serializing & deserializing library, accelerated by JIT (just-in-time compiling) and SIMD (single-instruction-multiple-data).… — @golangch.bsky.social2 likes and reposts
- Sep 22, 2025A blazingly fast JSON serializing & deserializing library for #golang #go #json — @davidcorto.bsky.social1 likes and repost · 1 reply
- Aug 1, 2026sonic by @ByteDanceOSS (⭐️ 9561) A blazingly fast JSON serializing & deserializing library #go — @golangoss.bsky.social0 likes and reposts · 1 reply
On Stack Overflow · 2
- Dec 21, 2023Large JSON response takes a lot of time in GoFiber0 votes
- Jan 11, 2023what's the most efficient way to iterate over an interface{} object in Go?-2 votes · 1 answer
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Add focused package tests beside changed Go code.
- Very specific: line 33
Do not disclose security bugs in public issues.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Repository Guidelines
Project Structure & Module Organization
Sonic is a Go JSON library with JIT, SIMD, and native-code acceleration. Public APIs live at the repository root and in ast/, decoder/, encoder/, option/, unquote/, and utf8/. Implementation details live under internal/, including JIT, native dispatch, runtime helpers, caching, and encoder/decoder internals. C sources are in native/; generated Go native wrappers are under internal/native/. The workspace in go.work includes the root module plus compatibility/, external_jsonlib_test/, fuzz/, generic_test/, issue_test/, and loader/. Test data and examples live in testdata/, examples/, fuzz/corpus/, and package-local *_test.go files.
Build, Test, and Development Commands
go test ./...: run the main module tests.SONIC_USE_OPTDEC=1 SONIC_USE_FASTMAP=1 SONIC_ENCODER_USE_VM=1 go test ./...: exercise the optimized/VM path used in CI.cd loader && go test ./...: test the loader submodule.go test ./issue_testandgo test ./generic_test: run regression and compatibility suites from the workspace.go test ./compatibility: run the Go 1.27encoding/jsonsemantic drift catalog (seedocs/sonic-go127-compatibility.md)../scripts/test_race.sh: run the expected race-detection regression check../scripts/fuzz.sh fuzz, then./scripts/fuzz.sh runorrunopt: initialize and run fuzzing../scripts/bench.sh: run core encoder, decoder, AST, and external JSON benchmark suites../scripts/build-x86.sh [clang]: regenerate x86 native outputs after changingnative/*.c.
Coding Style & Naming Conventions
Use gofmt for all Go files and follow Go Code Review Comments. Keep generated native output synchronized with its C source. Go tests use TestXxx, BenchmarkXxx, and FuzzXxx. Issue regressions follow issue_test/issueNNN_test.go. Shell scripts should be executable, use bash consistently, and keep environment toggles explicit. Write repository documentation in English by default; use another language only when the target audience or existing document explicitly requires it.
Testing Guidelines
Add focused package tests beside changed Go code. For parser, encoder, JIT, SIMD, or loader changes, run both default and optimized/VM paths. For user-reported behavior fixes, add or update an issue_test case. For fuzz-sensitive parsing changes, seed fuzz/corpus/ or fuzz/testdata/ when useful.
Commit & Pull Request Guidelines
History and the PR template use Conventional Commits, for example feat: support Go 1.26, fix(decoder): handle ..., opt: ast node set, ci: add ..., or chore: update go mod. Branch names should use prefixes such as feature/, bugfix/, optimize/, doc/, ci/, test/, or refactor/; validate with ./scripts/check_branch_name.sh. PRs should describe user-visible impact, link issues when applicable, include tests or benchmark data for performance changes, and update user documentation when behavior changes.
Security & Compatibility Notes
Do not disclose security bugs in public issues; follow CONTRIBUTING.md and contact the maintainers. Supported Go versions are documented in README.md; be careful with linkname behavior on newer Go releases and use scripts/go_flags.sh patterns when needed.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

