golang-design / clipboard

📋 cross-platform clipboard package that supports accessing text and image in Go (macOS/Linux/Windows/Android/iOS)
https://golang.design/x/clipboard
MIT License
579 stars 64 forks source link

Remove Linux Cgo requirement #25

Open gen2brain opened 2 years ago

gen2brain commented 2 years ago

Did you consider using https://github.com/BurntSushi/xgb which is Cgo free/native binding to XCB? I am not sure though, but it should be possible to rewrite with XCB instead of Xlib so Linux implementation can be Cgo free.

changkun commented 2 years ago

It is an interesting option (maybe this fork is more up to date https://github.com/jezek/xgb), and also would be wonderful if we could remove cgo completely. Nevertheless, I think we will consider writing everything ourselves without introducing third dependencies outside golang.org.