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 the go-gl/gl API 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 the cmd/fyne packaging 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 by go-text/typesetting onto pixel buffers.
  • github.com/srwiley/rasterx — SVG-style anti-aliased rasterizer for path/stroke rendering used alongside oksvg.
  • github.com/fyne-io/oksvg — Fork of srwiley/oksvg for 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); provides image/math/fixed and image/draw used 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 by go-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 by fyne-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 the systray dependency 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 via execabs for 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 by go-indexeddb to avoid panics on undefined values.
  • github.com/fredbi/uri — URI parsing/validation used for storage and resource URIs in the storage package.

Internationalization#

  • github.com/nicksnyder/go-i18n/v2 — Translation catalog loading and message formatting; powers the lang/ package.
  • github.com/BurntSushi/toml — TOML parser used to load translation files and app metadata (the FyneApp.toml manifest).

CLI / Developer Tools#

  • github.com/urfave/cli/v2 — CLI framework for the cmd/fyne packaging/deployment tool.
  • github.com/yuin/goldmark — Markdown parser; used by the widget.RichText widget to render Markdown content in-UI.
  • golang.org/x/mod — Go module parsing (modfile, semver) used by the cmd/fyne tool for inspecting app module manifests.
  • golang.org/x/tools — Go analysis tooling; used by cmd/fyne to 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 .icns format during app bundling.
  • github.com/akavel/rsrc (indirect) — Windows resource compiler, dependency of goversioninfo.
  • github.com/mcuadros/go-version — Semantic version comparison used in the packaging tool’s dependency checks.
  • github.com/lucor/goinfo — Go environment introspection for the fyne CLI tool.

Testing#

  • github.com/stretchr/testify — Assertions and require helpers 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:

PackageFilesRole
os114File I/O, environment, platform detection
fmt96String formatting, error messages
strings83String manipulation throughout
image52Go’s built-in image type hierarchy (all canvas objects use image.NRGBA, etc.)
io48Streams for resource loading
errors48Error wrapping and sentinel errors
math35Geometry calculations in layout and painter
sync26Mutexes and WaitGroups for thread-safe canvas/widget state
context7Relatively 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:

DependencyProjects using itNotes
github.com/stretchr/testify38 / 50Near-universal test utility
github.com/fsnotify/fsnotify27 / 50Common file-watch pattern (config reload, hot reload)
github.com/BurntSushi/toml12 / 50TOML config is a recurring theme
github.com/urfave/cli/v210 / 50Popular CLI framework, though cobra dominates
golang.org/x/sys, x/text, x/image, x/mod, x/toolsMost projectsThe 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#

  1. fyne-io ecosystem forksfyne-io/oksvg, fyne-io/image, fyne-io/gl-js, fyne-io/glfw-js are 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.

  2. go-text/typesetting as the font engine — Replacing FreeType with the go-text project (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 indirect golang/freetype retention suggests a phased migration.

  3. 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.

  4. Linux portal integration — Both godbus/dbus and rymdport/portal are 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.

  5. Minimal testing infrastructure — Despite 249 test files using testify, there are no mock-generation frameworks (no gomock, mockery). Fyne relies on its own test package (which provides a headless test driver) and testify assertions only, keeping the test dependency surface small.