Skip to content
Myr

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

6 files+8 added−8 removed

modified:.github/workflows/gin.yml+1 added-1 removed
modified:docs/doc.md+2 added-2 removed
82 unmodified lines
83```sh84go build -tags=go_json .85```8687[sonic](https://github.com/bytedance/sonic) (you have to ensure that your cpu supports avx instruction.)87[sonic](https://github.com/bytedance/sonic)8889```sh90$ go build -tags="sonic avx" .90$ go build -tags=sonic .91```9293### Build without `MsgPack` rendering feature94
2351 unmodified lines
modified: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.45//go:build !jsoniter && !go_json && !(sonic && avx && (linux || windows || darwin) && amd64)5//go:build !jsoniter && !go_json && !(sonic && (linux || windows || darwin))67package json89import "encoding/json"
13 unmodified lines
modified: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.45//go:build sonic && avx && (linux || windows || darwin) && amd645//go:build sonic && (linux || windows || darwin)67package json89import "github.com/bytedance/sonic"
14 unmodified lines
modified:go.mod+1 added-1 removed
1 unmodified line
23go 1.23.045require (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.12
36 unmodified lines
modified:go.sum+2 added-2 removed
1github.com/bytedance/sonic v1.13.1 h1:Jyd5CIvdFnkOWuKXr+wm4Nyk2h0yAFsr8ucJgEasO3g=2github.com/bytedance/sonic v1.13.1/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4=1github.com/bytedance/sonic v1.13.2 h1:8/H1FempDZqC4VqjptGo14QQlJx8VdZJegxs6wwfqpQ=2github.com/bytedance/sonic v1.13.2/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4=3github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=4github.com/bytedance/sonic/loader v0.2.4 h1:ZWCw4stuXUsn1/+zQDqeE7JKP+QO47tz7QCNan80NzY=5github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI=6github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
105 unmodified lines