{"id":19437867,"url":"https://github.com/architect/plugin-go","last_synced_at":"2026-05-16T04:03:10.622Z","repository":{"id":152473091,"uuid":"620445199","full_name":"architect/plugin-go","owner":"architect","description":"Go runtime + workflow integration for Architect","archived":false,"fork":false,"pushed_at":"2023-03-29T17:04:45.000Z","size":15,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-07T21:37:36.778Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/architect.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":null,"code_of_conduct":".github/code_of_conduct.md","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}},"created_at":"2023-03-28T17:39:08.000Z","updated_at":"2024-09-30T00:07:24.000Z","dependencies_parsed_at":"2023-04-12T12:32:32.950Z","dependency_job_id":null,"html_url":"https://github.com/architect/plugin-go","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Fplugin-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Fplugin-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Fplugin-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Fplugin-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/architect","download_url":"https://codeload.github.com/architect/plugin-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240619444,"owners_count":19830206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-10T15:16:07.363Z","updated_at":"2026-05-16T04:03:05.575Z","avatar_url":"https://github.com/architect.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/architect/assets.arc.codes/raw/main/public/architect-logo-light-500b%402x.png\"\u003e\n  \u003cimg alt=\"Architect Logo\" width=\"500px\" src=\"https://github.com/architect/assets.arc.codes/raw/main/public/architect-logo-500b%402x.png\"\u003e\n\u003c/picture\u003e\n\u003c/p\u003e\n\n## [`@architect/plugin-go`](https://www.npmjs.com/package/@architect/plugin-go)\n\n\u003e Go runtime + workflow integration for Architect\n\n[![GitHub CI status](https://github.com/architect/plugin-go/workflows/Node%20CI/badge.svg)](https://github.com/architect/plugin-go/actions?query=workflow%3A%22Node+CI%22)\n\n\n## Install\n\nInto your existing Architect project:\n\n```sh\nnpm i @architect/plugin-go --save-dev\n```\n\nAdd the following to your Architect project manifest (usually `app.arc`):\n\n```arc\n@aws\nruntime go # sets Go as the the default runtime for your entire project\n\n@plugins\narchitect/plugin-go\n```\n\nOr, if you'd prefer to add a single Go Lambda to start, forego the above `runtime go` setting in your project manifest, and add the following to a single Lambda:\n\n```arc\n# src/http/get-index/config.arc\n@aws\nruntime go\n```\n\n\n## Usage\n\nNow, simply author and port Lambdas in the `src` tree (with appropriate Cargo files). For example:\n\n```go\n// src/http/get-index/src/main.rs\n#[macro_use]\nextern crate json;\nuse json::{stringify};\nuse lambda_http::{run, service_fn, Body, Error, Request, Response};\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Error\u003e {\n  run(service_fn(function_handler)).await\n}\n\nasync fn function_handler(_event: Request) -\u003e Result\u003cResponse\u003cBody\u003e, Error\u003e {\n  let body = object!{\n    ok: true,\n  };\n  let resp = Response::builder()\n    .status(200)\n    .header(\"content-type\", \"application/json\")\n    .body(stringify(body).into())\n    .map_err(Box::new)?;\n  Ok(resp)\n}\n```\n\nThe above function will be automatically compiled by Architect to `./.build/http/get-index/` with `cargo build` (for local development) and `cargo lambda build` (for final deployment to Lambda) commands. (The destination build directory is configurable, [see below](#configuration).)\n\nWhen working locally, Sandbox automatically detects changes to your Go handlers and re-compiles them for you.\n\n\n## Configuration\n\n### Lambda architecture\n\nBy default, Architect Go uses the Lambda architecture available in all regions: `x86_64`. However, if your app is deployed in a region that supports `arm64`, we strongly suggest configuring that like so in your project manifest:\n\n```arc\n@aws\narchitecture arm64\n```\n\n\u003e Caveat: due to the way Architect runtime plugins work under the hood, Architect Go only respects the project's global architecture setting. If your project includes non-go Lambdas that need to use a different architecture, their architecture should be [configured individually via `config.arc`](https://arc.codes/docs/en/reference/configuration/function-config#architecture).\n\n\n### Project manifest settings\n\nThe following higher-level settings are also available in your Architect project manifest with the `@go` settings pragma:\n- `build` - customize the build directory; defaults to `.build`\n  - Note: make sure you add this directory to your `.gitignore`\n\nExample:\n\n```arc\n@go\n# Build into `./dist`\nbuild dist\n```\n\n\n### Build output\n\n`cargo` features fairly verbose output logging, which is disabled by default. To enable it, pass the CLI flag `--verbose|-v` or `--debug|-d`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchitect%2Fplugin-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchitect%2Fplugin-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchitect%2Fplugin-go/lists"}