taubyte-go-sdk-constraints

Installation
SKILL.md

Go SDK Constraints

Use this skill for any Go function implementation or debugging.

Go function filesystem layout (non-negotiable)

  • Authoring layout: after tau new function --template empty --language Go, all hand-written Go for the function lives in empty.go at the function root — the same directory as go.mod (e.g. code/functions/<name>/empty.go). Do not put empty.go under lib/ or any subdirectory for source you maintain.
  • Never manually create lib/, never move or copy empty.go into lib/, and never hand-author main.go (or any extra .go shims) in the function tree to “fix” the build. That pattern duplicates packages, confuses the WASM layout, and breaks tau build function / CI (e.g. found packages lib and main in /src/lib).
  • Do not “normalize” the tree: no merging a second main.go under lib/, no relocating the scaffold out of the root.
  • If tau build function or a local experiment once dropped main.go or a lib/ tree into the repo, treat those as mistakes or stale artifacts when they contradict the root-empty.go rule: remove stray lib/ and hand-curated main.go, keep only root empty.go (+ go.mod / .taubyte/* as generated). Do not recreate lib/ to satisfy the compiler.

Local WASM build test (preferred over ad-hoc tau build tree hacks)

From the function root (directory containing empty.go and go.mod), with Docker available, use taubyte/go-wasi so the official /utils/wasm.sh path runs against a clean /src copy — not by adding lib/ or main.go locally.

mkdir -p out
docker run -it --rm \
  -e CODE=/src \
Related skills

More from taubyte/skills

Installs
11
Repository
taubyte/skills
First Seen
Apr 22, 2026