What is Energy: Core Concepts and Rendering Engines
mainEnergy is a cross-platform desktop application framework for Go built using LCL, CEF, and Webview (Webview2, Webkit2). It offers three distinct rendering modes that can be used independently or in a hybrid architecture:
- LCL Native Mode: Uses LCL native UI components. This is lightweight and follows the system's native visual style. It provides over 100+ native GUI components (buttons, tables, tree views, etc.).
- Webview Hybrid Mode: Uses system runtimes (WebView2 on Windows, WebKit2 on Linux/macOS). This allows for a Go backend (window management, system calls, file I/O) and a Web frontend (HTML/CSS/JS using Vue, React, Angular, etc.).
- CEF Mode: Uses the full Chromium Embedded Framework (CEF3) for complete browser capabilities.
Key features include:
- IPC: High-performance, event-driven bidirectional communication between Go and the Web frontend with automatic type conversion.
- Local Resource Loading: Supports custom protocols to read local files or
go:embedresources directly without an HTTP server. - NO CGO: Optional pure Go development mode to simplify compilation environments.