{"id":48528931,"url":"https://github.com/tinywasm/tinygo","last_synced_at":"2026-04-07T23:30:44.165Z","repository":{"id":348812700,"uuid":"1199930699","full_name":"tinywasm/tinygo","owner":"tinywasm","description":"Automated TinyGo installer for tinywasm ecosystem with cross-platform support","archived":false,"fork":false,"pushed_at":"2026-04-03T00:14:56.000Z","size":33,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T09:51:54.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tinywasm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-02T21:26:00.000Z","updated_at":"2026-04-03T00:14:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tinywasm/tinygo","commit_stats":null,"previous_names":["tinywasm/tinygo"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tinywasm/tinygo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Ftinygo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Ftinygo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Ftinygo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Ftinygo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinywasm","download_url":"https://codeload.github.com/tinywasm/tinygo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Ftinygo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31533823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-07T23:30:42.454Z","updated_at":"2026-04-07T23:30:44.158Z","avatar_url":"https://github.com/tinywasm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tinygo\n\u003cimg src=\"docs/img/badges.svg\"\u003e\n\nAutomated TinyGo installer for the `tinywasm` ecosystem. This package provides a standalone, cross-platform (Linux, macOS, Windows) solution to manage TinyGo installations without requiring administrator privileges or user interaction.\n\n## Features\n\n- **Zero-Admin**: Installs into `~/.tinywasm/tinygo/`, avoiding the need for `sudo`.\n- **Cross-Platform**: Full support for Linux (amd64/arm64), macOS (amd64/arm64), and Windows (amd64).\n- **Automated**: Handles downloading, extracting (tar.gz/zip), and binary verification.\n- **Unattended**: Designed for CI/CD and developer environment bootstrap.\n- **Idempotent**: Won't re-download if the specified version is already present.\n\n## Installation\n\n```go\nimport \"github.com/tinywasm/tinygo\"\n```\n\n## Usage\n\n### Ensure TinyGo is Installed\n\nThe most common use case is ensuring TinyGo is available before running a build.\n\n```go\nbinPath, err := tinygo.EnsureInstalled(\n    tinygo.WithLogger(func(msg string) {\n        fmt.Println(msg)\n    }),\n)\nif err != nil {\n    log.Fatal(err)\n}\nfmt.Printf(\"TinyGo is ready at: %s\\n\", binPath)\n```\n\n### Detection\n\nCheck if TinyGo is already in the system PATH or locally installed.\n\n```go\nif tinygo.IsInstalled() {\n    path, _ := tinygo.GetPath()\n    version, _ := tinygo.GetVersion()\n    fmt.Printf(\"Found TinyGo %s at %s\\n\", version, path)\n}\n```\n\n### Manual Installation\n\nExplicitly trigger an installation of a specific version.\n\n```go\nerr := tinygo.Install(\n    tinygo.WithVersion(\"0.40.1\"),\n    tinygo.WithInstallDir(\"/custom/path\"),\n)\n```\n\n### Environment for Subprocesses\n\nWhen TinyGo is installed locally, consumers must inject `TINYGOROOT` into any subprocess that invokes `tinygo build`:\n\n```go\nbinPath, _ := tinygo.EnsureInstalled()\ncmd := exec.Command(binPath, \"build\", \"-o\", \"out.wasm\", \".\")\ncmd.Env = tinygo.GetEnv()  // injects TINYGOROOT + PATH\nout, err := cmd.CombinedOutput()\n```\n\n## How it Works\n\nSee the [Install Flow diagram](docs/diagrams/install_flow.md) for the full decision tree.\n\n1. **Detection**: Checks if `tinygo` is available in the system `PATH`.\n2. **Fallback**: If not found, checks for a local install at `~/.tinywasm/tinygo/`.\n3. **Download**: If missing, downloads the official release from GitHub.\n4. **Extraction**: `.tar.gz` for Linux/macOS, `.zip` for Windows.\n5. **Verification**: Runs `tinygo version` to confirm the binary is functional.\n\n## Testing\n\n```bash\ngo test ./...\n```\n\nSee [docs/architecture.md](docs/architecture.md) for the full testing strategy and design decisions.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinywasm%2Ftinygo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinywasm%2Ftinygo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinywasm%2Ftinygo/lists"}