mirror of
https://github.com/agent-substrate/substrate.git
synced 2026-11-12 10:35:06 +08:00
Adds Postgres as an alternative persistence backend for ateapi as proposed in #731. Currently this is opt-in with flags in ateapi or use the `--store-backend=postgres` option in the install script. Slack discussion: https://cloud-native.slack.com/archives/C0B6M3E2J3D/p1785183769252679 Performance benchmark results for Postgres vs Redis: https://docs.google.com/document/d/12-ko_BFHcBo_nJkx9f4B7zMbiiWKC2saGhMhZG3aQ-s/edit?usp=sharing Benchmarks are not included in this PR, but you can reproduce the results by following the doc above Limitations and questions: - This draft does not yet handle migrations, this might come as a follow up - It currently uses `testcontainers` for testing Postgres, but as a result it adds a lot of dependencies --------- Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
34 lines
921 B
Go
34 lines
921 B
Go
// SPDX-License-Identifier: Apache-2.0
|
|
// SPDX-FileCopyrightText: 2026 The Ebitengine Authors
|
|
|
|
//go:build linux && (ppc64le || s390x)
|
|
|
|
package purego
|
|
|
|
import "unsafe"
|
|
|
|
type callbackArgs struct {
|
|
index uintptr
|
|
// args points to the argument block.
|
|
//
|
|
// The structure of the arguments goes
|
|
// float registers followed by the
|
|
// integer registers followed by the stack.
|
|
//
|
|
// This variable is treated as a continuous
|
|
// block of memory containing all of the arguments
|
|
// for this callback.
|
|
args unsafe.Pointer
|
|
// Below are out-args from callbackWrap
|
|
result uintptr
|
|
// stackArgs points to stack-passed arguments for architectures where
|
|
// they can't be made contiguous with register args (e.g., ppc64le).
|
|
// On other architectures, this is nil and stack args are read from
|
|
// the end of the args block.
|
|
stackArgs unsafe.Pointer
|
|
}
|
|
|
|
func (c *callbackArgs) stackFrame() unsafe.Pointer {
|
|
return c.stackArgs
|
|
}
|