fix: sonic on arm64 (#4234)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Yash · committed by GitHub · parent 67c9d4e · Browse files · 6 files·+8 added−8 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+8 added−8 removed
- other:+8 added−8 removed
Provenance
- Commit
7a1b655- Tree
0da2928- Author
Yash <yashgorana@users.noreply.github.com>- Committer
GitHub <noreply@github.com>- Parent
67c9d4e
6 files changed+8 added−8 removed
modified:.github/workflows/gin.yml+1 added-1 removed
36 unmodified lines3738394041414243444538 unmodified lines36 unmodified lines test-tags: [ "", "-tags nomsgpack", '--ldflags="-checklinkname=0" -tags "sonic avx"', '--ldflags="-checklinkname=0" -tags sonic', "-tags go_json", "-race", ] include:38 unmodified linesmodified:docs/doc.md+2 added-2 removed
82 unmodified lines83 ```sh84 go build -tags=go_json .85 ```86 87-[sonic](https://github.com/bytedance/sonic) (you have to ensure that your cpu supports avx instruction.)87+[sonic](https://github.com/bytedance/sonic)88 89 ```sh90-$ go build -tags="sonic avx" .90+$ go build -tags=sonic .91 ```92 93 ### Build without `MsgPack` rendering feature94 2351 unmodified linesmodified:internal/json/json.go+1 added-1 removed
1 // Copyright 2017 Bo-Yi Wu. All rights reserved.2 // Use of this source code is governed by a MIT style3 // license that can be found in the LICENSE file.4 5-//go:build !jsoniter && !go_json && !(sonic && avx && (linux || windows || darwin) && amd64)5+//go:build !jsoniter && !go_json && !(sonic && (linux || windows || darwin))6 7 package json8 9 import "encoding/json"13 unmodified linesmodified:internal/json/sonic.go+1 added-1 removed
1 // Copyright 2022 Gin Core Team. All rights reserved.2 // Use of this source code is governed by a MIT style3 // license that can be found in the LICENSE file.4 5-//go:build sonic && avx && (linux || windows || darwin) && amd645+//go:build sonic && (linux || windows || darwin)6 7 package json8 9 import "github.com/bytedance/sonic"14 unmodified linesmodified:go.mod+1 added-1 removed
1 unmodified line2 3 go 1.23.04 5 require (6- github.com/bytedance/sonic v1.13.16+ github.com/bytedance/sonic v1.13.27 github.com/gin-contrib/sse v1.1.08 github.com/go-playground/validator/v10 v10.26.09 github.com/goccy/go-json v0.10.210 github.com/json-iterator/go v1.1.1236 unmodified linesmodified:go.sum+2 added-2 removed
1-github.com/bytedance/sonic v1.13.1 h1:Jyd5CIvdFnkOWuKXr+wm4Nyk2h0yAFsr8ucJgEasO3g=2-github.com/bytedance/sonic v1.13.1/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4=1+github.com/bytedance/sonic v1.13.2 h1:8/H1FempDZqC4VqjptGo14QQlJx8VdZJegxs6wwfqpQ=2+github.com/bytedance/sonic v1.13.2/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4=3 github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=4 github.com/bytedance/sonic/loader v0.2.4 h1:ZWCw4stuXUsn1/+zQDqeE7JKP+QO47tz7QCNan80NzY=5 github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI=6 github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=105 unmodified lines