Go bindings for libghostty-vt.
104
fork

Configure Feed

Select the types of activity you want to include in your feed.

possibility of automating the binding generation? #1

open opened by bpavuk.neocities.org edited

first off, I want to make one thing clear:

I DON'T know if the Go ecosystem has anything good for code generation. for Zig it's the entire comptime. for Kotlin it's KSP preprocessors and/or compiler plugins + KotlinPoet for type-safe bindings generation.

that being said, there are projects much larger than Ghostty in scale that save a lot of time thanks to programmatic code generation, such as windows and windows-sys Rust crates being nearly fully auto-generated through Microsoft's definition language used all around Windows COM.

if Zig-based libghostty-vt is already C-compatible, what stops one from generating such bindings from a known interface definition language, that being C headers?

you kinda do this with an agent skill, but spending tokens on something that could have been a build script?...

I think if something existed in the Go ecosystem that was good and produced good results (easy to smoke test the repo!) then I'd be supportive. But there are also a variety of things already in this repo that are "conveniences" for Go over the C API and I'm sure it'd struggle with that.

you kinda do this with an agent skill, but spending tokens on something that could have been a build script?...

Yeah, agree, but agents so far have been very excellent at this.

Ultimately, I'd say that if there is a POC someone wants to show me thats great, but this isn't something I really want to spend time pursuing at the moment.

totally valid. just had a look - Go's codegen is ass and I wonder why it stays like so for this long...

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:ab5inzxnpw4j2zvzlxupr5ut/sh.tangled.repo.issue/3mlgwwa3aew22