make cli # Build drift CLI
go mod tidy # Sync dependencies
gofmt -w . # Format code
go vet ./... # Lintgo test ./...
DRIFT_UPDATE_SNAPSHOTS=1 go test ./pkg/... # Update snapshot testsgo run cmd/docgen/main.go # Generate Docusaurus docscmd/drift/- CLI tool (build, run, clean, init, devices, log)cmd/docgen/- Documentation generatorpkg/- Core framework packagesshowcase/- Demo applicationscripts/- Skia build scriptsthird_party/- Skia source and prebuilt binarieswebsite-docs/guides/- Website guides source fileswebsite/- Docusaurus website config
- CGO bridges Go to Skia (C++)
- Android: Kotlin embedder, JNI bridge
- iOS: Swift embedder, Metal rendering
- Keep bridge functions thin; delegate logic to Go
When adding iOS or Android native code, ensure these files in cmd/drift/internal/templates/ are updated:
- iOS: Info.plist, xcodeproj, and xtool project templates
- Android: AndroidManifest.xml and project templates
When editing iOS templates, update both
ios/Info.plist.tmplandxtool/Info.plist.tmpl(and corresponding xcodeproj/xtool templates) in the same change.