detached 4f9ffc5

feat(cef): add purego-cef dependency (local replace) and CEF config schema

commit
4f9ffc5d69dc9bdb9406bcf32175e311660b3164
author
brice · · 2026-03-19 15:18 UTC
committer
brice · · 2026-03-28 04:35 UTC
parent
408294c
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +18 -0
M go.mod +2 -0
@@ -25,6 +25,8 @@ require (
2525
2626 replace github.com/ebitengine/purego => github.com/bnema/purego v0.0.0-20260323095903-91aa177a2704
2727
28+replace github.com/bnema/purego-cef => ../purego-cef
29+
2830 require (
2931 github.com/atotto/clipboard v0.1.4 // indirect
3032 github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
@@ -25,6 +25,8 @@ require (
25 25
26 replace github.com/ebitengine/purego => github.com/bnema/purego v0.0.0-20260323095903-91aa177a270426 replace github.com/ebitengine/purego => github.com/bnema/purego v0.0.0-20260323095903-91aa177a2704
27 27
28+replace github.com/bnema/purego-cef => ../purego-cef
29+
28 require (30 require (
29 github.com/atotto/clipboard v0.1.4 // indirect31 github.com/atotto/clipboard v0.1.4 // indirect
30 github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect32 github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
A internal/infrastructure/cef/doc.go +2 -0
@@ -0,0 +1,2 @@
1+// Package cef implements port.Engine using the Chromium Embedded Framework via purego-cef.
2+package cef
@@ -0,0 +1,2 @@
1+// Package cef implements port.Engine using the Chromium Embedded Framework via purego-cef.
2+package cef
M internal/infrastructure/config/engine.go +14 -0
@@ -8,6 +8,7 @@ type EngineConfig struct {
88 Profile PerformanceProfile `mapstructure:"profile" toml:"profile" yaml:"profile"`
99 CookiePolicy CookiePolicy `mapstructure:"cookie_policy" toml:"cookie_policy" yaml:"cookie_policy"`
1010 WebKit WebKitEngineConfig `mapstructure:"webkit" toml:"webkit" yaml:"webkit"`
11+ CEF CEFEngineConfig `mapstructure:"cef" toml:"cef" yaml:"cef"`
1112 }
1213
1314 // WebKitEngineConfig holds WebKit-specific engine options.
@@ -57,6 +58,19 @@ type WebKitEngineConfig struct {
5758 NetworkProcessMemoryStrictThreshold float64 `mapstructure:"network_process_memory_strict_threshold" toml:"network_process_memory_strict_threshold" yaml:"network_process_memory_strict_threshold"` //nolint:lll // struct tags exceed lll limit
5859 }
5960
61+// CEFEngineConfig holds CEF-specific engine options.
62+type CEFEngineConfig struct {
63+ // CEFDir is the path to the CEF framework directory containing
64+ // libcef.so and the Resources/locales subdirectories.
65+ CEFDir string `mapstructure:"cef_dir" toml:"cef_dir" yaml:"cef_dir"`
66+ // LogSeverity controls CEF's internal log verbosity.
67+ // 0 = default, 1 = verbose, 2 = info, 3 = warning, 4 = error, 99 = disable.
68+ LogSeverity int32 `mapstructure:"log_severity" toml:"log_severity" yaml:"log_severity"`
69+ // WindowlessFrameRate is the maximum frame rate for off-screen rendering.
70+ // Default: 30. Higher values increase CPU usage.
71+ WindowlessFrameRate int32 `mapstructure:"windowless_frame_rate" toml:"windowless_frame_rate" yaml:"windowless_frame_rate"`
72+}
73+
6074 // PerformanceConfigFromEngine constructs a PerformanceConfig from the
6175 // new [engine] config section, for use with ResolvePerformanceProfile.
6276 func PerformanceConfigFromEngine(e *EngineConfig) PerformanceConfig {
@@ -8,6 +8,7 @@ type EngineConfig struct {
8 Profile PerformanceProfile `mapstructure:"profile" toml:"profile" yaml:"profile"`8 Profile PerformanceProfile `mapstructure:"profile" toml:"profile" yaml:"profile"`
9 CookiePolicy CookiePolicy `mapstructure:"cookie_policy" toml:"cookie_policy" yaml:"cookie_policy"`9 CookiePolicy CookiePolicy `mapstructure:"cookie_policy" toml:"cookie_policy" yaml:"cookie_policy"`
10 WebKit WebKitEngineConfig `mapstructure:"webkit" toml:"webkit" yaml:"webkit"`10 WebKit WebKitEngineConfig `mapstructure:"webkit" toml:"webkit" yaml:"webkit"`
11+ CEF CEFEngineConfig `mapstructure:"cef" toml:"cef" yaml:"cef"`
11 }12 }
12 13
13 // WebKitEngineConfig holds WebKit-specific engine options.14 // WebKitEngineConfig holds WebKit-specific engine options.
@@ -57,6 +58,19 @@ type WebKitEngineConfig struct {
57 NetworkProcessMemoryStrictThreshold float64 `mapstructure:"network_process_memory_strict_threshold" toml:"network_process_memory_strict_threshold" yaml:"network_process_memory_strict_threshold"` //nolint:lll // struct tags exceed lll limit58 NetworkProcessMemoryStrictThreshold float64 `mapstructure:"network_process_memory_strict_threshold" toml:"network_process_memory_strict_threshold" yaml:"network_process_memory_strict_threshold"` //nolint:lll // struct tags exceed lll limit
58 }59 }
59 60
61+// CEFEngineConfig holds CEF-specific engine options.
62+type CEFEngineConfig struct {
63+ // CEFDir is the path to the CEF framework directory containing
64+ // libcef.so and the Resources/locales subdirectories.
65+ CEFDir string `mapstructure:"cef_dir" toml:"cef_dir" yaml:"cef_dir"`
66+ // LogSeverity controls CEF's internal log verbosity.
67+ // 0 = default, 1 = verbose, 2 = info, 3 = warning, 4 = error, 99 = disable.
68+ LogSeverity int32 `mapstructure:"log_severity" toml:"log_severity" yaml:"log_severity"`
69+ // WindowlessFrameRate is the maximum frame rate for off-screen rendering.
70+ // Default: 30. Higher values increase CPU usage.
71+ WindowlessFrameRate int32 `mapstructure:"windowless_frame_rate" toml:"windowless_frame_rate" yaml:"windowless_frame_rate"`
72+}
73+
60 // PerformanceConfigFromEngine constructs a PerformanceConfig from the74 // PerformanceConfigFromEngine constructs a PerformanceConfig from the
61 // new [engine] config section, for use with ResolvePerformanceProfile.75 // new [engine] config section, for use with ResolvePerformanceProfile.
62 func PerformanceConfigFromEngine(e *EngineConfig) PerformanceConfig {76 func PerformanceConfigFromEngine(e *EngineConfig) PerformanceConfig {

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close