Skip to content

Commit 7a1b655

Browse files
authored
fix: sonic on arm64 (#4234)
1 parent 67c9d4e commit 7a1b655

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

.github/workflows/gin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
[
3939
"",
4040
"-tags nomsgpack",
41-
'--ldflags="-checklinkname=0" -tags "sonic avx"',
41+
'--ldflags="-checklinkname=0" -tags sonic',
4242
"-tags go_json",
4343
"-race",
4444
]

docs/doc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ go build -tags=jsoniter .
8484
go build -tags=go_json .
8585
```
8686

87-
[sonic](https://github.com/bytedance/sonic) (you have to ensure that your cpu supports avx instruction.)
87+
[sonic](https://github.com/bytedance/sonic)
8888

8989
```sh
90-
$ go build -tags="sonic avx" .
90+
$ go build -tags=sonic .
9191
```
9292

9393
### Build without `MsgPack` rendering feature

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/gin-gonic/gin
33
go 1.23.0
44

55
require (
6-
github.com/bytedance/sonic v1.13.1
6+
github.com/bytedance/sonic v1.13.2
77
github.com/gin-contrib/sse v1.1.0
88
github.com/go-playground/validator/v10 v10.26.0
99
github.com/goccy/go-json v0.10.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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=
33
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
44
github.com/bytedance/sonic/loader v0.2.4 h1:ZWCw4stuXUsn1/+zQDqeE7JKP+QO47tz7QCNan80NzY=
55
github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI=

internal/json/json.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a MIT style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !jsoniter && !go_json && !(sonic && avx && (linux || windows || darwin) && amd64)
5+
//go:build !jsoniter && !go_json && !(sonic && (linux || windows || darwin))
66

77
package json
88

internal/json/sonic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a MIT style
33
// license that can be found in the LICENSE file.
44

5-
//go:build sonic && avx && (linux || windows || darwin) && amd64
5+
//go:build sonic && (linux || windows || darwin)
66

77
package json
88

0 commit comments

Comments
 (0)