Skip to content

futomaru/gopher-nadenade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gopher-nadenade

ブラウザで Go 製 Gopher をなでるだけのミニマムアプリです。UI ロジックは Go で記述し、WASM にコンパイルして配信します。生成物は web/ ディレクトリにまとまっており、静的ファイルをそのままホスティングできます。

前提

  • Go 1.21 以上(WASM ターゲットを含む標準ツールチェーン)

ビルド & 実行

# WASM をビルド(web/main.wasm が生成されます)
make wasm

# ローカルサーバを起動
make serve

http://localhost:8080 にアクセスすると、Gopher をなでて表情を変えられます。

  • make wasmweb/wasm_exec.js も併せてコピーします。Go のインストール先で wasm_exec.js が見つからない場合は、適宜ダウンロードして web/ に配置してください。

ディレクトリ構成

  • cmd/server — 単純な静的ファイルサーバ
  • wasm — ブラウザ側のロジック(Go -> WASM)
  • web — 配信する静的ファイル(make wasm の成果物を含む)

Gopher illustrations

Gopher illustrations by Egon Elbre (https://github.com/egonelbre/gophers) , based on the Go gopher designed by Renee French. Licensed under the Creative Commons Attribution 3.0 License (CC BY 3.0).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published