Skip to content

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

GoGPU Logo

gogpu/editor

Pure Go Text/Code Editor Widget
GPU-accelerated, embeddable, zero CGO.

LicenseGo Version


Overview

gogpu/editor is a reusable native text and code editor widget for Go — like Monaco Editor but for Go desktop and WASM applications. GPU-accelerated rendering via gogpu/gg, widget system via gogpu/ui.

Key Goals

  • Embeddable — drop into any Go application as a widget
  • GPU-accelerated — glyph atlas, ClearType LCD, MSDF fallback
  • Pure Go — zero CGO, cross-compiles everywhere (Windows, macOS, Linux, WASM)
  • Code editor — syntax highlighting, line numbers, code folding
  • Rich text — multi-font, styled runs, WYSIWYG editing
  • IDE-ready — LSP client, DAP client, minimap, diagnostics

Status

🚧 Early development. Architecture defined in ADR-028 (internal).

Architecture

gogpu/editor/
├── document/ # PieceTable document model, undo/redo
├── layout/ # Text layout engine, line breaking, styled runs
├── view/ # Editor widget, gutter, cursor, selection, minimap
├── input/ # Keyboard, mouse, IME
├── syntax/ # Syntax highlighting (TextMate, Tree-sitter)
└── lsp/ # Language Server Protocol client (future)

Enterprise References

EditorKey PatternWhat We Take
VS CodePieceTree document modelEfficient insert/delete data structure
MonacoMVVM, decorationsSeparation of model, view, decorations
ScintillaSimple Model-View25 years proven, portable
ZedGPU-accelerated, GPUIGPU text rendering patterns
CodeMirror 6Immutable state, pluginsFunctional state management
Xi-editorRope, async frontend-backendData structure research
cosmic-textPure Rust text layoutPure language text layout patterns

Ecosystem

Part of the gogpu Pure Go GPU ecosystem:

RepoPurpose
gogpuApp framework, windowing
wgpuPure Go WebGPU
gg2D graphics, GPU text rendering
uiGUI toolkit
editorText/Code editor widget ← you are here

Contributing

Contributions welcome! Architecture decisions and open questions are tracked internally. Join the discussion to participate.

License

MIT

About

Pure Go Text/Code Editor Widget — GPU-accelerated, embeddable, zero CGO. Like Monaco for Go.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors