baml_go

package
v0.41.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2025 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLoadLibrary          = errors.New("failed loading BAML shared library")
	ErrNotSupportedPlatform = errors.New("supported only Linux and MacOS")
)

BAML specific error messages

Functions

func BamlVersion

func BamlVersion() string

func CallFunctionFromC

func CallFunctionFromC(runtime unsafe.Pointer, functionName string, encodedArgs []byte, id uint32) (unsafe.Pointer, error)

func CallFunctionStreamFromC

func CallFunctionStreamFromC(runtime unsafe.Pointer, functionName string, encodedArgs []byte, id uint32) (unsafe.Pointer, error)

func CreateBamlRuntime

func CreateBamlRuntime(rootPath string, srcFilesJson string, envVarsJson string) (unsafe.Pointer, error)

func DestroyBamlRuntime

func DestroyBamlRuntime(runtime unsafe.Pointer) error

func InvokeRuntimeCli

func InvokeRuntimeCli(args []string) (int, error)

func RegisterCallbacks

func RegisterCallbacks(callbackFn unsafe.Pointer, errorFn unsafe.Pointer) error

func SetSharedLibraryPath

func SetSharedLibraryPath(path string)

SetSharedLibraryPath sets the library path for BAML.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL