Growse

module
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT

README

Growse

Growseは、GoまたはJavaScriptをクライアントサイド言語として実行する実験的なWebブラウザです。

HTMLとCSSで画面を構築し、Tab単位のGo / JS selectorでWebGoまたはJavaScriptから同じDOM、Event、Scheduler、Fetch、Storage、Navigationを操作できます。Goが既定です。

Growseでできること

項目 主な機能
ブラウジング 左側Vertical Tab、URL入力、リンク遷移、same-document Routing、戻る、進む、再読込、Scroll復元
HTML / DOM 要素の検索・生成・追加・削除、属性・class・Form値の操作
CSS Layout Box Model、Flexbox、Grid、Position、Overflow
CSS Paint Color、Gradient、複数Background、Shadow、Opacity、2D Transform
Animation CSS Transition、@keyframes、Easing、Iteration、Direction、Fill Mode、Pause、prefers-reduced-motion
Form Form Controls、Focus、Constraint Validation、GET / POST Submission
Scheduler timeout、interval、Animation Frame、Page終了時の自動解除
Storage Tab間で共有する永続Local Storage、Storage Event、Tab単位のSession Storage
HTTP WebGo Fetch、Cookie、Same-Origin Policy、CORS、Freshness・再検証・Disk対応のHTTP Cache
Dual Runtime Go既定、Tab単位Go / JavaScript切替、完全reload、Engine間分離
External JavaScript 通常HTTP(S) Pageのclassic / async / defer、ES Modules、dynamic import、import map
WebAssembly JavaScript API、streaming compile / instantiate、Memory / Table / Instance quota
Browsing Context same / cross-origin iframe、sandbox、postMessage、独立Runtime
Offline Service Worker registration / lifecycle / fetch、Cache Storage、idle restart
Web API Go / JavaScript共通のDOM Event、Fetch、Scheduler、History、Navigation、Storage、Console API
DevTools Console、Inspector、Network、秘密情報を持たないPage / Frame / Service Worker Runtime診断

詳しい対応範囲と制限は、CSS対応表、Form / Fetch / Cookie対応表、Storage / Cache対応表を参照してください。

インストール

Installerを使う

Linux、macOS、Git Bashを利用できるWindowsでは、最新版を~/.local/binへインストールできます。InstallerはダウンロードしたArchiveのSHA-256 checksumを検証します。

Installerはcommandに加えて、OSごとのGUI Applicationも登録します。

  • Linux: Desktop EntryとIconを$XDG_DATA_HOMEへ配置します。未設定時は~/.local/shareを使用します。UbuntuのApplication一覧から起動してDockへ登録できます。
  • macOS: Growse.appを~/Applicationsへ配置し、growse commandから同じApplication Bundleを起動します。
  • Windows: 専用Iconを配置し、ユーザーのStart Menu ProgramsへGrowse Shortcutを登録します。

実行中は、リリース確認、環境判定、検証、インストールの進捗を段階ごとに表示します。対話端末ではColor表示になり、CIやFileへのRedirectでは自動的にColorを無効化します。明示的に切り替える場合はGROWSE_COLOR=always|neverを、Colorを使わない一般的な設定にはNO_COLOR=1を指定できます。

wget -qO- https://github.com/Grove-Computing/Growse/releases/latest/download/install.sh | bash

Versionとインストール先を指定する場合は、環境変数を利用します。

wget -qO- https://github.com/Grove-Computing/Growse/releases/latest/download/install.sh | GROWSE_VERSION=v0.14.0 GROWSE_INSTALL_DIR=/usr/local/bin bash

GUI Applicationの配置先は、GROWSE_DATA_HOME、GROWSE_APPLICATIONS_DIR、GROWSE_WINDOWS_PROGRAMS_DIRで変更できます。

Docker imageを使う

Linux amd64のDocker imageを、GitHub Container Registryから取得できます。

docker pull ghcr.io/grove-computing/growse:v0.14.0

GrowseはGUI applicationのため、Containerから起動する場合はホストのDisplay ServerとGPU deviceを接続する必要があります。

クイックスタート

必要なもの
  • Go 1.26以降
  • Gioが利用するOSのグラフィックス開発ライブラリ

Ubuntu / Debian系では、次のパッケージをインストールします。

sudo apt-get update
sudo apt-get install -y libvulkan-dev gcc pkg-config libwayland-dev libx11-dev libx11-xcb-dev libxkbcommon-x11-dev libgles2-mesa-dev libegl1-mesa-dev libffi-dev libxcursor-dev

ほかのLinuxディストリビューションについては、GioのLinuxセットアップ手順を参照してください。

起動する
go mod download
go run ./cmd/growse

起動すると、左側Vertical Tab Rail、戻る・進む・再読込・DevTools・URL入力欄・Gopherボタン・状態表示を備えたブラウザウィンドウが開きます。

Demoを試す

別のターミナルでDemoを1つ配信し、Growseでhttp://localhost:8080を開きます。

python3 -m http.server 8080 --directory examples/data-app

ほかのDemoへ切り替える場合は、配信するディレクトリを変更します。

Demo 配信ディレクトリ 確認できる機能
Counter examples/counter click Eventによるカウント更新
Todo examples/todo テキスト入力、Form送信、完了切替、削除
CSS3 Core Showcase examples/css3-core Custom Property、calc()、Media Query、Gradient、Box Model
Flexbox Showcase examples/flexbox grow / shrink、wrap、alignment、gap、auto margin、nested flex
Dashboard examples/dashboard Grid、Position、複数Background、Shadow、Transform、Opacity
Animation Showcase examples/animation hover Transition、複数Keyframes Animation
Data App Showcase examples/data-app Form、WebGo Fetch、structured Headers、Session Cookie、DOM更新、Animation
Persistent App Showcase examples/persistent-app Scheduler、same-document Routing、Local / Session Storage、Fetch、HTTP Cache、offline状態
Multi-Tab Workspace go run ./examples/multi-tab-workspace Vertical Tab、Storage Event、共有Cookie / Cache、Tab別Session / Scheduler
DevTools Showcase go run ./examples/devtools Console 4 level、DOM / Style / Layout、成功Fetch、redirect、cache、HTTP error、timeout
Dual Runtime Showcase go run ./examples/dual-runtime 同じUIのGo / JavaScript切替、DOM、Event、Timer、Fetch、Storage、History、Runtime error
External Web Platform go run ./examples/external-web-platform 外部classic / Module、dynamic import、WASM、same / cross-origin iframe、Service Worker offline、cross-origin CSS、sandbox

WebGoソースは通常のGo build対象から除外するため、各Demoでは_app.goとして配置しています。

Multi-Tab Workspaceは専用のlocal fixture serverを起動し、Growseでhttp://localhost:8080を開きます。Notes画面のリンクからTasksとActivityを新しいVertical Tabへ開けます。外部ServiceやAPI keyは不要です。

DevTools Showcaseも専用のlocal fixture serverだけを使用します。外部通信や実Credentialなしで、Console、Inspector、Networkの通常・error・timeout・cache状態を再現できます。

Dual Runtime Showcaseもlocalhost内だけで完結します。ツールバーのGo / JSを押すとPageを完全reloadし、同じHTML/CSS上のCounterとWeb API処理を選択Engineだけで実行します。

External Web Platform Showcaseはtop-level、CDN、Frameを別のlocal Originで配信し、Internet、DNS、Credentialなしでv0.14.0の外部サイト経路を再現します。起動後に表示されるURLをJavaScript Engineで開くと、Module / WASM / iframe / Service Worker / sandbox状態を確認できます。

ブラウザの仕組み

Rendering Pipeline

Growseは取得したHTMLとCSSを、独自のPipelineで画面へ描画します。

HTML / CSS
  → DOM
  → Computed Style
  → Layout Tree
  → Display List
  → Viewport

Animation中のPaintとHit Testingは、同じFrameの値を参照します。DOMを変更するとComputed Style以降を再計算し、画面を更新します。

Navigation
  • 左側のVertical Tab RailからTabを作成、選択、終了できます。TabごとにNavigation、History、Scroll、Focus、WebGo Runtime、Scheduler、Session Storageを保持します。
  • URL入力欄でEnterを押すか、Gopherボタンを押すと移動します。
  • リンクのclick、戻る、進む、履歴を増やさない再読込に対応しています。
  • Ctrl+T(macOSではCommand+T)でTabを作成し、Ctrl+W(macOSではCommand+W)でactive Tabを終了します。Ctrl+TabとCtrl+Shift+Tabで前後のTabへ切り替えます。
  • Ctrl+R(macOSではCommand+R)で通常の再読込、Ctrl+Shift+R(macOSではCommand+Shift+R)でHTTP Cacheへ再検証を要求する強制再読込を実行します。
  • リンクへカーソルを重ねると、認証情報を除去した遷移先URLを状態表示に示します。
  • ウィンドウ内では、青いGopherをマウスカーソルとして表示します。
Go / JavaScript Dual Runtime

Goでは<script type="text/go">をYaegiで、JavaScriptではtype省略、text/javascript、application/javascriptとtype="module"をgojaで実行します。Go sourceはtrusted loopbackかつsame-originに限定します。JavaScriptは通常のHTTP(S) Pageでinline / external classicとES Modulesを実行し、redirect、MIME、mixed content、CORS、credentials、integrity、sizeをBrowser側で検証します。選択していないEngineのScriptは取得しません。

EngineはTabごとに保持し、切り替え時は旧Runtime、Event、Timer、Fetch、Storage callbackを停止して完全reloadします。Go RuntimeとJavaScript Runtimeを同時実行せず、値やfunctionを共有しません。

  • growse/dom: DOM、Form、Eventを操作
  • growse/fetch: Headers、JSON / text / binary / FormData body、AbortController、timeoutを備えた非同期HTTP Requestを実行
  • growse/navigation: 現在URL、pushState / replaceState、History traversalとEventを操作
  • growse/scheduler: timeout、interval、Animation Frameを登録・解除
  • growse/storage: Origin単位のLocal / Session Storageを操作し、OnChangeで別TabのLocal Storage更新を受信
  • growse/console: Log、Info、Warn、ErrorをPage単位のDevTools Consoleへ記録
  • Fetch callback: PageのEvent Queueで実行
  • Page終了時: Timer、Frame callback、実行中Fetchをcancelし、Runtime参照を解放

JavaScriptはconsole、DOM / Event、Timer / Animation Frame、Promise形式fetch、Storage、Navigationに加え、ES Modules、WebAssembly、iframe messaging、Service Worker / Cache Storageの検証済みsubsetを提供します。Node.js、npm、CommonJS、WASI、OS、filesystem、process、Go reflectionは公開しません。詳細はRuntime / Web API対応表を参照してください。

Go / JavaScript / WASMとService WorkerはBrowser UIとは別のresource-bounded worker processで実行し、version / size制限付きIPCとBrowserが再検証するbrokered APIだけを使用します。必須sandbox状態を検証できない場合はcodeを実行しません。この境界は未知のOS kernel、Go runtime、goja、wazero、decoderの脆弱性まで排除するものではありません。詳細はRuntime worker / Web Platform設計とSECURITY.mdを参照してください。

WebGo DevTools

ツールバーのDevToolsボタンまたはF12で、active Tabの下部へDevToolsを開閉できます。選択panelとfilterはTabごとに保持されます。

  • Console: Go / JavaScript Engine、4 level、script / runtime errorを表示し、level filterとclearを提供
  • Inspector: active PageのDOM snapshotを選択し、公開attribute、主要Computed Style、Layout Boxをread-only表示
  • Network: Navigation、resource、Form、Fetchのmethod、外部Script Engine、redacted URL、timing、status、redirect、cache、size、error categoryを表示
  • Runtime: Page / Frame / Service Worker context、script kind / schedule、Engine、generation、有限error category、sandbox capabilityを表示

DevToolsはRequest / Response body、Header、Cookie、Authorizationを保持しません。URL userinfoとquery valueをマスクし、password input valueもInspectorへ公開しません。安全上限と詳細はWebGo DevTools設計を参照してください。

ドキュメント

文書 内容
CSS対応表 CSS Property、Layout、Animationの対応状況と制限
Form / Fetch / Cookie対応表 Form、HTTP、Cookie、CORSの対応状況と制限
Storage / Cache対応表 Web Storage、HTTP Cache、永続化、quotaの対応状況と制限
Visual Regression Test 固定Viewport、Font、ScaleによるDashboardとPersistent Appの画像回帰テスト
Performance Baseline Layout、Paint、Form、Scheduler、History、Storage、CacheのBenchmark基準値
WPT由来テスト Web Platform Testsから移植したTestと出典
Developer Supply Chain Security 不可視Code検査、Extension管理、署名、Credential、Incident Response
WebGo DevTools設計 Console、Inspector、Network、Runtimeのデータ境界、redaction、安全上限
Runtime / Web API対応表 Go / JavaScript Engine、Script type、API対応、制約、非対応範囲
Runtime worker / Web Platform設計 worker process、IPC、sandbox、generation、Frame / Service Worker所有境界
v0.9.0リリース定義 v0.9.0のTheme、Scope、完了条件
v0.10.0リリース定義 v0.10.0のTheme、Scope、完了条件
v0.11.0リリース定義 v0.11.0のTheme、Scope、完了条件
v0.12.0リリース定義 v0.12.0 WebGo DevToolsのTheme、Scope、完了条件
v0.13.0リリース定義 v0.13.0 Go / JavaScript Dual RuntimeのTheme、Scope、完了条件
v0.14.0リリース定義 v0.14.0 External JavaScript / Module / WASM / iframe / Service Worker / sandboxのTheme、Scope、完了条件

品質チェック

ローカルで、CIと同等の検査を実行できます。

make ci

主な検査項目は次のとおりです。

  • go test -race ./...
  • 最低Test Coverage 70%
  • go vet
  • Staticcheck
  • actionlint
  • govulncheck
  • 不可視Unicode、未承認Binary、Editor Extension recommendationの検査
  • Installer、Release成果物、Docker、文書の検証

Go Modules、GitHub Actions、Docker base imageの依存関係は、Dependabotで週次確認します。Pull Requestでは追加されたHigh/Criticalの既知脆弱性をDependency Reviewで遮断します。

セキュリティ

v0.14.0のRuntime workerは外部JavaScriptのhost作用をdefault denyにしますが、実験的browserとして未知のnative/runtime脆弱性への完全耐性は保証しません。外部Go sourceは引き続きtrusted loopbackだけに限定されます。Growseを権限の高いユーザーや機密profileで実行しないでください。

脆弱性の非公開報告方法、サポート対象、通信とResource LoadingのSecurity BoundaryはSECURITY.mdを参照してください。

リリース成果物

v0.14.0のようなVersion tagをpushすると、GitHub Actionsが次の成果物、SHA-256 checksum、SPDX JSON SBOMをGitHub Releaseへ公開します。ArchiveとSBOMにはGitHub Artifact Attestation、Docker imageにはBuildKitのSBOMとSLSA Provenanceを付与します。

  • Linux amd64
  • macOS Intel
  • macOS Apple Silicon
  • Windows amd64
  • Linux amd64 Docker imageのVersion tagとlatest tag

Archiveには、Growse本体、Runtime workerとして再起動する同一検証済み実行ファイル、すべてのDemoを同梱します。Gopher cursor imageは実行ファイルへ埋め込まれるため、別途assetを配置する必要はありません。

checksum、SBOM、Provenanceを使った成果物の検証手順は、SECURITY.mdのSupply Chain Securityを参照してください。

Go Gopherのクレジット

The Go Gopher was designed by Renée French.

The Go Gopher is licensed under the Creative Commons Attribution 4.0 License.

Directories

Path Synopsis
cmd
growse command
growse-smoke command
Command growse-smoke runs the packaged External Web Platform fixture without opening a GUI.
Command growse-smoke runs the packaged External Web Platform fixture without opening a GUI.
sbomcheck command
securityscan command
workercheck command
Command workercheck verifies that a packaged Growse executable can enter and cleanly leave both child-process modes without opening the GUI.
Command workercheck verifies that a packaged Growse executable can enter and cleanly leave both child-process modes without opening the GUI.
examples
devtools command
dual-runtime command
internal
animation
Package animation provides the time model shared by CSS transitions and animations.
Package animation provides the time model shared by CSS transitions and animations.
app
Package app starts the Growse desktop application.
Package app starts the Growse desktop application.
browser
Package browser contains the state and navigation lifecycle of a Growse browser window.
Package browser contains the state and navigation lifecycle of a Growse browser window.
css
Package css parses CSS syntax into Growse-owned rules.
Package css parses CSS syntax into Growse-owned rules.
devtools
Package devtools provides bounded, read-only diagnostics for one browser page.
Package devtools provides bounded, read-only diagnostics for one browser page.
dom
Package dom defines Growse's browser-owned document model.
Package dom defines Growse's browser-owned document model.
events
Package events はGrowseのDOMイベント配信を管理する。
Package events はGrowseのDOMイベント配信を管理する。
forms
Package forms implements browser-owned HTML form state and serialization.
Package forms implements browser-owned HTML form state and serialization.
html
Package html parses HTML and converts it into Growse's own DOM.
Package html parses HTML and converts it into Growse's own DOM.
layout
Package layout builds a simple visual tree from the Growse DOM.
Package layout builds a simple visual tree from the Growse DOM.
network
Package network retrieves resources for the Growse browser.
Package network retrieves resources for the Growse browser.
paint
Package paint converts layout output into renderer-independent commands.
Package paint converts layout output into renderer-independent commands.
runtime
Package runtime はページで使用する交換可能なGo実行環境を定義する。
Package runtime はページで使用する交換可能なGo実行環境を定義する。
runtime/isolated
Package isolated runs Growse page runtimes behind a bounded child-process protocol.
Package isolated runs Growse page runtimes behind a bounded child-process protocol.
runtime/javascript
Package javascript implements the page-scoped Growse JavaScript Runtime.
Package javascript implements the page-scoped Growse JavaScript Runtime.
runtime/workerproto
Package workerproto defines the bounded wire format shared by the browser broker and isolated runtime workers.
Package workerproto defines the bounded wire format shared by the browser broker and isolated runtime workers.
runtime/yaegi
Package yaegi はYaegiを使ったGrowseページのRuntimeを実装する。
Package yaegi はYaegiを使ったGrowseページのRuntimeを実装する。
serviceworker
Package serviceworker owns origin-scoped Service Worker registrations.
Package serviceworker owns origin-scoped Service Worker registrations.
storage
Package storage はOriginごとのWeb Storage data modelを提供する。
Package storage はOriginごとのWeb Storage data modelを提供する。
style
Package style matches CSS rules and computes values for DOM elements.
Package style matches CSS rules and computes values for DOM elements.
ui
Package ui provides Gio widgets for the Growse browser chrome.
Package ui provides Gio widgets for the Growse browser chrome.
updater
Package updater checks for signed Growse release artifacts and installs a verified executable update for the current platform.
Package updater checks for signed Growse release artifacts and installs a verified executable update for the current platform.
webapi/console
Package console はWebGoスクリプト向けのログAPIを提供する。
Package console はWebGoスクリプト向けのログAPIを提供する。
webapi/dom
Package dom はWebGoスクリプト向けのDOM APIを提供する。
Package dom はWebGoスクリプト向けのDOM APIを提供する。
webapi/fetch
Package fetch provides the HTTP API exposed to WebGo programs.
Package fetch provides the HTTP API exposed to WebGo programs.
webapi/form
Package form provides form data values exposed to WebGo programs.
Package form provides form data values exposed to WebGo programs.
webapi/navigation
Package navigation はWebGoへ現在のDocument URLを安全な値として公開する。
Package navigation はWebGoへ現在のDocument URLを安全な値として公開する。
webapi/scheduler
Package scheduler provides page-scoped timing APIs exposed to WebGo programs.
Package scheduler provides page-scoped timing APIs exposed to WebGo programs.
webapi/storage
Package storage はWebGoへLocal StorageとSession Storageを公開する。
Package storage はWebGoへLocal StorageとSession Storageを公開する。
webapi/strconv
Package strconv はWebGoスクリプト向けの文字列変換APIを提供する。
Package strconv はWebGoスクリプト向けの文字列変換APIを提供する。
webapi/url
Package url provides URL value helpers exposed to WebGo programs.
Package url provides URL value helpers exposed to WebGo programs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL