Skip to content

Support Go SDK #31

@DorianZheng

Description

@DorianZheng

Summary

Add Go SDK support for BoxLite, enabling Go applications to embed BoxLite runtime.

Motivation

  • Go is widely used for infrastructure and DevOps tools
  • Many AI agent frameworks are written in Go
  • Listed as "Coming soon" in README

Proposed API

package main

import (
    "context"
    "fmt"
    "github.com/boxlite-labs/boxlite-go"
)

func main() {
    runtime, _ := boxlite.NewRuntime(boxlite.DefaultOptions())
    defer runtime.Close()

    box, _ := runtime.Create(context.Background(), boxlite.BoxOptions{
        Image: "alpine:latest",
    })
    defer box.Destroy(context.Background())

    result, _ := box.Exec(context.Background(), "echo", "Hello from Go!")
    fmt.Println(result.Stdout)
}

Tasks

  • Design Go API (idiomatic Go patterns)
  • Create FFI bindings to Rust core
  • Implement streaming stdout/stderr
  • Add context.Context support for cancellation
  • Write documentation and examples
  • Publish to pkg.go.dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions