Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remoting API #522

Open
hexfusion opened this issue May 13, 2024 · 2 comments
Open

remoting API #522

hexfusion opened this issue May 13, 2024 · 2 comments
Labels
area/cli Related to the client/CLI enhancement New feature or request triaged This looks like a valid issue

Comments

@hexfusion
Copy link

hexfusion commented May 13, 2024

As the popularity of bootc grows a central location for go types/examples would be useful for projects. Speaking with @cgwalters he is willing to consider something similar to rpmostree-client-go[1] for bootc but there is some intersection with [2].

Curious if instead of creating go client as a os exec wrapper, exposing some of the Rust functionality via CGO? Please include me in future conversations on the topic if possible 🙏 Wasmtime CGO examples as ref. [3],[4]. I understand that CGO is not ideal but in terms of interaction with Rust over FFI, I don't believe there is another option.

[1] https://github.com/coreos/rpmostree-client-go/
[2] #518
[3] https://github.com/bytecodealliance/wasmtime/blob/b869b66bce8a57c9e83db4e3bcd6809d88e94a5f/crates/c-api/src/types/extern.rs#L39
[4] https://github.com/bytecodealliance/wasmtime-go/blob/cabc733f95623fb897b2c35266124192ffca94b4/externtype.go#L9C12-L9C29

@cgwalters
Copy link
Collaborator

Curious if instead of creating go client as a os exec wrapper, exposing some of the Rust functionality via CGO

My experience with CGO has not been great. We don't have strong high performance needs here right? An IPC framework of any form is almost certainly going to be dramatically safer and easier to maintain.

I would start with a simple "stable CLI with --json output" as the lowest common denominator to start, which is almost what we have - we just need to stabilize the CLI and json schema.

But, if we needed to go to IPC, my preferences would be one of:

@cgwalters cgwalters added enhancement New feature or request triaged This looks like a valid issue area/cli Related to the client/CLI labels May 13, 2024
@hexfusion hexfusion changed the title go SDK/CGO support go SDK May 15, 2024
@cgwalters cgwalters changed the title go SDK remoting API May 16, 2024
@cgwalters
Copy link
Collaborator

This issue also intersects with #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to the client/CLI enhancement New feature or request triaged This looks like a valid issue
Projects
None yet
Development

No branches or pull requests

2 participants