webui-go still uses civetweb somewhere? #489
|
I can 'go build' examples from webui-go, e.g. serve_a_folder. ldd serve_a_folder: I wonder where 'civetweb' is, does webui-go uses it as a websocket server, or it creates its own websocket and just uses webui.js from the webui project? |
Replies: 2 comments 3 replies
Yes, webui use civetweb for web server and websocket server, and webui core is dealing with running web browsers, WebView, bind UI with backend etc... |
|
This brings up an interesting question, what about using a golang-websocket to replace civetweb, since Go is more cross-platform friendly than c? in that case webui could become a single go-binary, similar to Wails but using browser and webview(Wails can only do webview), with Go the deployment will be much easier, but Go might be harder to provide binding to other languages, C is the best there for multi-language binding. |
You can use all complete Go APIs.
This is not because webui binding, but because webui simply sends an event from UI to your backend Go function, then can use all complete Go APIs as you like, then sends back a response to UI.