Fyne — Dependencies#
Module info#
- Module:
fyne.io/fyne/v2 - Go version: 1.19
- Direct dependencies: 35
- Indirect dependencies: 15 (go.mod indirect block); go.sum has 128 lines (~64 module checksums total)
Dependency categories#
Rendering / Graphics (core infrastructure)#
github.com/go-gl/gl— OpenGL bindings for desktop rendering (CGo); the desktop GLFW driver renders all widgets via OpenGL draw calls.github.com/go-gl/glfw/v3.3/glfw— GLFW window/event management on desktop (CGo). Provides the native window, input events, and GL context.github.com/fyne-io/gl-js— WebGL bindings for the WASM/browser driver; mirrors thego-gl/glAPI in JavaScript land.github.com/fyne-io/glfw-js— GLFW-compatible wrapper over browser events for WASM builds.github.com/fogleman/gg— 2D geometry / canvas primitives used for software-rasterised rendering paths and icon generation in thecmd/fynepackaging tool.
Text / Typography#
github.com/go-text/typesetting— Full OpenType/TrueType font shaping and layout engine; handles complex scripts, kerning, ligatures. A heavyweight but correct choice.github.com/go-text/render— Rasterises shaped glyphs produced bygo-text/typesettingonto pixel buffers.github.com/srwiley/rasterx— SVG-style anti-aliased rasterizer for path/stroke rendering used alongsideoksvg.github.com/fyne-io/oksvg— Fork ofsrwiley/oksvgfor SVG icon parsing and rendering; kept as a direct fyne-io fork to stay on a stable API.golang.org/x/image— Image format helpers (fixed-point math, draw ops); providesimage/math/fixedandimage/drawused throughout the painter.golang.org/x/text— Unicode/text processing including language tags used by the i18n system.github.com/golang/freetype(indirect) — Legacy FreeType font rasterizer; retained as indirect for some code paths, being superseded bygo-text.
Image / Media#
github.com/fyne-io/image— Extended image loading (WebP, etc.) beyond Go stdlib.github.com/nfnt/resize— Image resampling for thumbnail/icon generation.github.com/jsummers/gobmp(indirect) — BMP format support pulled in byfyne-io/image.
Platform / OS integration#
fyne.io/systray— System tray icon and menu support on desktop platforms (Windows, macOS, Linux). First-party fyne ecosystem module split to its own module.github.com/godbus/dbus/v5— D-Bus IPC for Linux/XDG desktop portal integration (file pickers, notifications on modern Linux desktops).github.com/rymdport/portal— XDG Desktop Portal client, used for sandboxed file dialogs and notifications under Flatpak/Snap.github.com/go-ole/go-ole— Windows COM/OLE bindings; used by thesystraydependency for Windows taskbar integration.github.com/fsnotify/fsnotify— Cross-platform file system watching; used to detect theme/settings file changes at runtime.golang.org/x/sys— Low-level OS calls; on Windows used for registry access (windows/registry), on all platforms viaexecabsfor secure subprocess execution.github.com/jeandeaual/go-locale— System locale detection, feeding the i18n subsystem.github.com/natefinch/atomic— Atomic file writes for safe config persistence (prevents partial writes on crash).
Web / Browser#
github.com/hack-pad/go-indexeddb— IndexedDB bindings for WASM storage backend (replaces filesystem storage in browsers).github.com/hack-pad/safejs(indirect) — Safe JS value wrapper used bygo-indexeddbto avoid panics on undefined values.github.com/fredbi/uri— URI parsing/validation used for storage and resource URIs in thestoragepackage.
Internationalization#
github.com/nicksnyder/go-i18n/v2— Translation catalog loading and message formatting; powers thelang/package.github.com/BurntSushi/toml— TOML parser used to load translation files and app metadata (theFyneApp.tomlmanifest).
CLI / Developer Tools#
github.com/urfave/cli/v2— CLI framework for thecmd/fynepackaging/deployment tool.github.com/yuin/goldmark— Markdown parser; used by thewidget.RichTextwidget to render Markdown content in-UI.golang.org/x/mod— Go module parsing (modfile, semver) used by thecmd/fynetool for inspecting app module manifests.golang.org/x/tools— Go analysis tooling; used bycmd/fyneto inspect packages during cross-compilation setup.golang.org/x/tools/go/vcs(deprecated module) — VCS detection for packaging tool; retained for legacy support.
Packaging / Build Tools#
github.com/josephspurrier/goversioninfo— Embeds Windows version resources (.syso) into binaries for proper Windows app metadata.github.com/jackmordaunt/icns/v2— Converts PNG icons to macOS.icnsformat during app bundling.github.com/akavel/rsrc(indirect) — Windows resource compiler, dependency ofgoversioninfo.github.com/mcuadros/go-version— Semantic version comparison used in the packaging tool’s dependency checks.github.com/lucor/goinfo— Go environment introspection for thefyneCLI tool.
Testing#
github.com/stretchr/testify— Assertions andrequirehelpers used across 249 test files; the dominant test dependency.
Indirect / Transitive utilities#
gopkg.in/yaml.v3— YAML parsing (indirect; pulled in by testify and i18n).github.com/davecgh/go-spew/github.com/pmezard/go-difflib— testify internals for pretty-printing diffs.github.com/cpuguy83/go-md2man/v2/github.com/russross/blackfriday/v2— urfave/cli man-page generation dependencies (indirect).
Stdlib reliance#
Fyne is notably stdlib-heavy for its core logic. The top imported stdlib packages by file count:
| Package | Files | Role |
|---|---|---|
os | 114 | File I/O, environment, platform detection |
fmt | 96 | String formatting, error messages |
strings | 83 | String manipulation throughout |
image | 52 | Go’s built-in image type hierarchy (all canvas objects use image.NRGBA, etc.) |
io | 48 | Streams for resource loading |
errors | 48 | Error wrapping and sentinel errors |
math | 35 | Geometry calculations in layout and painter |
sync | 26 | Mutexes and WaitGroups for thread-safe canvas/widget state |
context | 7 | Relatively light; used mainly in storage and async operations |
The image package family from stdlib is the backbone of Fyne’s internal pixel representation — all canvas objects ultimately produce image.Image values. CGo ("C" appears 33 times) is present for OpenGL and GLFW integration, confirming the desktop backend requires a C toolchain.
Shared dependencies#
Dependencies also used by many other projects in the 50-project set:
| Dependency | Projects using it | Notes |
|---|---|---|
github.com/stretchr/testify | 38 / 50 | Near-universal test utility |
github.com/fsnotify/fsnotify | 27 / 50 | Common file-watch pattern (config reload, hot reload) |
github.com/BurntSushi/toml | 12 / 50 | TOML config is a recurring theme |
github.com/urfave/cli/v2 | 10 / 50 | Popular CLI framework, though cobra dominates |
golang.org/x/sys, x/text, x/image, x/mod, x/tools | Most projects | The x/ family is effectively extended stdlib |
Fyne’s rendering-specific deps (go-gl, go-text, fyne-io/*) are unique to it — no other project in the set pulls in an OpenGL renderer.
Vendoring#
No vendor directory is present. Fyne uses Go module proxy (sum database) for dependency management. This is appropriate for a toolkit/library rather than a deployed binary — consumers control their own module graphs. The relatively small go.sum (128 lines, ~64 modules) reflects a lean transitive graph for a GUI framework of this scope.
Notable dependency decisions#
fyne-io ecosystem forks —
fyne-io/oksvg,fyne-io/image,fyne-io/gl-js,fyne-io/glfw-jsare maintained forks of upstream packages. This gives the team control over breaking changes and platform-specific patches without waiting on upstream maintainers — a pragmatic choice for a multi-platform UI framework.go-text/typesettingas the font engine — Replacing FreeType with thego-textproject (originally developed in collaboration with the Go team) is a forward-looking choice that provides correct Unicode shaping for right-to-left scripts and complex languages. The indirectgolang/freetyperetention suggests a phased migration.Dual rendering paths are fully separated by import — Desktop deps (
go-gl/gl,go-gl/glfw) and WASM deps (fyne-io/gl-js,fyne-io/glfw-js) are both listed in go.mod but selected by build tags at compile time. This is an unusual pattern; normally you wouldn’t see both in one module, but it avoids a split-module design at the cost of a slightly confusing go.mod.Linux portal integration — Both
godbus/dbusandrymdport/portalare present, supporting both the traditional D-Bus API and the newer XDG Desktop Portal spec used by sandboxed Linux applications. This shows careful attention to modern Linux packaging constraints.Minimal testing infrastructure — Despite 249 test files using testify, there are no mock-generation frameworks (no gomock, mockery). Fyne relies on its own
testpackage (which provides a headless test driver) and testify assertions only, keeping the test dependency surface small.