feat(go-sdk): add Exec interface to Go SDK#327
Merged
DorianZheng merged 1 commit intoboxlite-ai:mainfrom Mar 4, 2026
Merged
Conversation
Add box.Exec() method with full parameter support:
- command, args, env, tty, user, timeout, working_dir
- stdout/stderr streaming via CGo callback
- Returns ExecResult{ExitCode, Stdout, Stderr}
Three-layer implementation:
- Rust C Bridge: boxlite_go_box_exec with opts_json parsing
- Go CGo Binding: ExecOptions/ExecResult + goOutputCallback
- Go Client: Box.Exec with time.Duration timeout conversion
Also adds dep_stubs.c for BOXLITE_DEPS_STUB=1 test builds and
darwin framework LDFLAGS (IOKit, DiskArbitration).
Closes boxlite-ai#198
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Contributor
Author
|
Opened by mistake, closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
box.Exec()method to the Go SDK, enabling command execution inside running boxes with full parameter support.Closes #198
Changes
Three-layer implementation:
rust/src/lib.rsboxlite_go_box_execwith JSON opts parsingbinding/exec.go,exec_bridge.cExecOptions/ExecResult+goOutputCallbackclient/box.go,types.goBox.Exec()withtime.Durationtimeout conversionBox.Exec()supports:command,args,env,tty,user,timeout,working_dirExecResult{ExitCode, Stdout, Stderr}Also includes:
dep_stubs.cforBOXLITE_DEPS_STUB=1test buildsIOKit,DiskArbitration)Test