{"id":46450188,"url":"https://github.com/fastly/compute-sdk-go","last_synced_at":"2026-03-06T00:12:22.920Z","repository":{"id":45643081,"uuid":"500362559","full_name":"fastly/compute-sdk-go","owner":"fastly","description":"Go SDK for building Fastly Compute applications","archived":false,"fork":false,"pushed_at":"2026-03-02T20:44:40.000Z","size":1080,"stargazers_count":87,"open_issues_count":15,"forks_count":11,"subscribers_count":19,"default_branch":"main","last_synced_at":"2026-03-03T18:39:04.777Z","etag":null,"topics":["compute-sdk","fastly-product"],"latest_commit_sha":null,"homepage":"https://developer.fastly.com/learning/compute/go/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fastly.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-06-06T09:04:51.000Z","updated_at":"2026-03-02T17:44:57.000Z","dependencies_parsed_at":"2023-10-11T19:37:36.243Z","dependency_job_id":"baa6c1ea-79c9-44e6-b334-ea107094f974","html_url":"https://github.com/fastly/compute-sdk-go","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/fastly/compute-sdk-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastly%2Fcompute-sdk-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastly%2Fcompute-sdk-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastly%2Fcompute-sdk-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastly%2Fcompute-sdk-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastly","download_url":"https://codeload.github.com/fastly/compute-sdk-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastly%2Fcompute-sdk-go/sbom","scorecard":{"id":393456,"data":{"date":"2025-08-11","repo":{"name":"github.com/fastly/compute-sdk-go","commit":"9bed73891f85a6eb23e2edf4deed6c26f5d7cfa6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.6,"checks":[{"name":"Code-Review","score":9,"reason":"Found 12/13 approved changesets -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"19 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build-examples.yml:1","Warn: no topLevel permission defined: .github/workflows/integration-tests.yml:1","Warn: no topLevel permission defined: .github/workflows/validate.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-examples.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/fastly/compute-sdk-go/build-examples.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-examples.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/fastly/compute-sdk-go/build-examples.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration-tests.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/fastly/compute-sdk-go/integration-tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration-tests.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/fastly/compute-sdk-go/integration-tests.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/integration-tests.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/fastly/compute-sdk-go/integration-tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/validate.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/fastly/compute-sdk-go/validate.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/validate.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/fastly/compute-sdk-go/validate.yml/main?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/validate.yml:30","Warn: goCommand not pinned by hash: .github/workflows/validate.yml:35","Warn: goCommand not pinned by hash: .github/workflows/validate.yml:40","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   3 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":-1,"reason":"internal error: internal error: Client.Checks.ListCheckRunsForRef: error during graphqlHandler.setupCheckRuns: non-200 OK status code: 502 Bad Gateway body: \"\u003chtml\u003e\\r\\n\u003chead\u003e\u003ctitle\u003e502 Bad Gateway\u003c/title\u003e\u003c/head\u003e\\r\\n\u003cbody\u003e\\r\\n\u003ccenter\u003e\u003ch1\u003e502 Bad Gateway\u003c/h1\u003e\u003c/center\u003e\\r\\n\u003chr\u003e\u003ccenter\u003enginx\u003c/center\u003e\\r\\n\u003c/body\u003e\\r\\n\u003c/html\u003e\\r\\n\"","details":null,"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T18:23:47.590Z","repository_id":45643081,"created_at":"2025-08-18T18:23:47.590Z","updated_at":"2025-08-18T18:23:47.590Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30093641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T20:42:30.420Z","status":"ssl_error","status_checked_at":"2026-03-04T20:42:30.057Z","response_time":59,"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":["compute-sdk","fastly-product"],"created_at":"2026-03-06T00:12:21.401Z","updated_at":"2026-03-06T00:12:22.909Z","avatar_url":"https://github.com/fastly.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# compute-sdk-go\n\nGo SDK for building [Fastly Compute](https://www.fastly.com/products/edge-compute) applications with [Go](https://go.dev) (1.23+) and [TinyGo](https://tinygo.org/) (0.33.0+).\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/fastly/compute-sdk-go.svg)](https://pkg.go.dev/github.com/fastly/compute-sdk-go)\n\n## Quick Start\n\nThe Fastly Developer Hub has a great [Quick Start guide for Go](https://developer.fastly.com/learning/compute/go/).\n\nAlternatively, you can take a look at the [Go Starter Kit](https://github.com/fastly/compute-starter-kit-go-default).\n\nIf you're using TinyGo, you'll also want to take a look at our [TinyGo Recommended Packages](#tinygo-recommended-packages) section, as this can help with the sharp edges of the SDK, like JSON support.\n\n## Supported Toolchains\n\nCompute builds on top of WebAssembly and the [WebAssembly System Interface](https://wasi.dev/).\n\nTinyGo supports WASI as a target, and Go does as of its 1.21 release.\n\nEach toolchain has its own tradeoffs.  Generally speaking, TinyGo produces smaller compiled artifacts and takes less RAM at runtime.  Build times are generally longer, sometimes considerably.  TinyGo does not support all of the Go standard library, and in particular support for the `reflect` package is incomplete.  This means that some third-party packages may not work with TinyGo.\n\nRuntime performance is mixed, with TinyGo faster on some applications and Go faster on others.  If you have a performance-critical application, we recommend benchmarking both toolchains to see which works best for you.\n\nTo switch between TinyGo and Go, set the `build` command in the `[scripts]` section of your `fastly.toml` as follows:\n\n    [scripts]\n    build = \"tinygo build -target=wasi -o bin/main.wasm .\"\n\nor\n\n    [scripts]\n    build = \"GOARCH=wasm GOOS=wasip1 go build -o bin/main.wasm .\"\n\nYou might need to adjust the actual build command depending on your project.\n\n## Installation\n\nIf you're using Go, download [the latest Go release](https://go.dev/dl/). For TinyGo, follow the [TinyGo Quick install guide](https://tinygo.org/getting-started/install/).\n\nThen, you can install `compute-sdk-go` in your project by running:\n\n`go get github.com/fastly/compute-sdk-go`\n\n## Examples\n\nExamples can be found in the [`examples`](./_examples) directory.\n\nThe Fastly Developer Hub has a collection of [common use cases in VCL ported to Go](https://developer.fastly.com/learning/compute/migrate/) which also acts as a great set of introductory examples of using Go on Compute.\n\n## API Reference\n\nThe API reference documentation can be found on [pkg.go.dev/github.com/fastly/compute-sdk-go](https://pkg.go.dev/github.com/fastly/compute-sdk-go).\n\n## Testing\n\nTests that rely on a Compute runtime use [Viceroy](https://github.com/fastly/Viceroy), our local development tool.\n\nThe `Makefile` installs viceroy in ./tools/ and uses this version to run tests.\n\nWrite your tests as ordinary Go tests.  Viceroy provides the Compute APIs locally, although be aware that not all platform functionality is available.  You can look at the `integration_tests` directory for examples.\n\nTo run your tests:\n\n    make test\n\nThis target runs tests in both Go and TinyGo, and `integration_tests` in both Go and TinyGo in Viceroy.  See additional targets in `Makefile` for running subsets of these tests.\n\nThe `targets/fastly-compute-wasi{,p1}.json` files provide TinyGo targets to run Viceroy.\n\n## Logging\n\nLogging can be done using a Fastly Compute Log Endpoint ([example](./_examples/logging-and-env/main.go)), or by using normal stdout like:\n\n```\nfmt.Printf(\"request received: %s\\n\", r.URL.String())\n```\n\n## Readthrough HTTP Cache Support\n\nCustomizing cache behaviour with the readthrough cache is an opt-in feature; enable it by adding `-tags=fsthttp_guest_cache` to the build line of your `fastly.toml`.\n\n```\n[scripts]\nbuild = \"tinygo build -target=wasip1 -tags=fsthttp_guest_cache -o bin/main.wasm .\"\n```\n\n## TinyGo Recommended Packages\n\nTinyGo is still a new project, which has yet to get a version `1.0.0`. Therefore, the project is incomplete, but in its current state can still handle a lot of tasks on Compute. However, [some languages features of Go are still missing](https://tinygo.org/docs/reference/lang-support/).\n\nTo help with your adoption of `compute-sdk-go`, here are some recommended packages to help with some of the current missing language features:\n\n### JSON Parsing\n\nTinyGo's  `reflect` support (which is needed by `encoding/json` among other things) is still new. While most use cases should work, for performance or other compatibility reasons you might need to consider a third-party JSON package if the standard library doesn't meet your needs.\n\n* [valyala/fastjson](https://github.com/valyala/fastjson)\n* [mailru/easyjson](https://github.com/mailru/easyjson)\n* [buger/jsonparser](https://github.com/buger/jsonparser)\n\n## Changelog\n\nThe changelog can be found [here](./CHANGELOG.md).\n\n## Security\n\nIf you find any security issues, see the [Fastly Security Reporting Page](https://www.fastly.com/security/report-security-issue) or send an email to: `security@fastly.com`\n\nNote that communications related to security issues in Fastly-maintained OSS as described here are distinct from [Fastly security advisories](https://www.fastly.com/security-advisories).\n\n## License\n\n[Apache-2.0 WITH LLVM-exception](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastly%2Fcompute-sdk-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastly%2Fcompute-sdk-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastly%2Fcompute-sdk-go/lists"}