Skip to content

feat: Add Go bindings package with centralized C header#84

Merged
kommander merged 2 commits intoanomalyco:mainfrom
dnakov:main
Aug 28, 2025
Merged

feat: Add Go bindings package with centralized C header#84
kommander merged 2 commits intoanomalyco:mainfrom
dnakov:main

Conversation

@dnakov
Copy link
Copy Markdown
Contributor

@dnakov dnakov commented Aug 26, 2025

Summary

  • Add complete Go bindings for OpenTUI with CGO integration
  • Move opentui.h to centralized location for all language bindings
  • Include working examples (basic and interactive console demo)

Test plan

  • Go package builds successfully (go build ./...)
  • All tests pass (go test -v)
  • Basic example runs and displays output
  • Console demo runs with interactive features
  • Integration with main repository build system

@dnakov dnakov requested a review from kommander as a code owner August 26, 2025 04:24
Comment thread packages/go/README.md
@kommander
Copy link
Copy Markdown
Collaborator

We should have a generator for the c headers from lib.zig

@dnakov
Copy link
Copy Markdown
Contributor Author

dnakov commented Aug 26, 2025

We should have a generator for the c headers from lib.zig

Hopefully zig will fix theirs one day
ziglang/zig#9698

@kommander
Copy link
Copy Markdown
Collaborator

You accidentally committed the example binary?

@dnakov
Copy link
Copy Markdown
Contributor Author

dnakov commented Aug 26, 2025

You accidentally committed the example binary?

fixed

@kommander
Copy link
Copy Markdown
Collaborator

I think this just might be going in. Let me check header generation with 0.15.1

@luuk00101
Copy link
Copy Markdown

@kommander how's it looking?

@kommander
Copy link
Copy Markdown
Collaborator

The zig interface changed on main, I think it is broken.

@dnakov
Copy link
Copy Markdown
Contributor Author

dnakov commented Aug 28, 2025

The zig interface changed on main, I think it is broken.

updated

dnakov added 2 commits August 28, 2025 19:16
- Add complete Go bindings for OpenTUI with CGO integration
- Move opentui.h to centralized location for all language bindings
- Include working examples (basic and interactive console demo)
- Add Go package to main repository build system
- Full test suite and documentation
- Remove binaries and unnecessary files from repository
- Update C header with new function signatures and types
- Add widthMethod parameter to buffer and text buffer creation
- Convert cursor functions to require renderer parameter
- Add new terminal capability functions
- Add Kitty keyboard protocol support
- Add terminal setup functions
- Update tests and documentation to match new APIs
- All tests passing with updated function signatures
@kommander kommander merged commit e06bd03 into anomalyco:main Aug 28, 2025
moutansos pushed a commit to moutansos/opentui that referenced this pull request Aug 29, 2025
## Summary
- Add complete Go bindings for OpenTUI with CGO integration  
- Move opentui.h to centralized location for all language bindings
- Include working examples (basic and interactive console demo)

## Test plan
- [x] Go package builds successfully (`go build ./...`)
- [x] All tests pass (`go test -v`)
- [x] Basic example runs and displays output
- [x] Console demo runs with interactive features
- [x] Integration with main repository build system
msmps pushed a commit that referenced this pull request Jan 8, 2026
## Summary
- Add complete Go bindings for OpenTUI with CGO integration  
- Move opentui.h to centralized location for all language bindings
- Include working examples (basic and interactive console demo)

## Test plan
- [x] Go package builds successfully (`go build ./...`)
- [x] All tests pass (`go test -v`)
- [x] Basic example runs and displays output
- [x] Console demo runs with interactive features
- [x] Integration with main repository build system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants