{"id":19225395,"url":"https://github.com/wasmcloud/actor-tinygo","last_synced_at":"2025-04-21T00:32:14.511Z","repository":{"id":39826002,"uuid":"482346870","full_name":"wasmCloud/actor-tinygo","owner":"wasmCloud","description":"SDK for writing wasmCloud actors in TinyGo","archived":false,"fork":false,"pushed_at":"2023-08-31T16:36:46.000Z","size":53,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-21T16:43:24.039Z","etag":null,"topics":["actor","actor-model","tinygo","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","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/wasmCloud.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}},"created_at":"2022-04-16T19:47:29.000Z","updated_at":"2023-01-19T04:25:05.000Z","dependencies_parsed_at":"2024-06-19T09:55:34.244Z","dependency_job_id":"6d314926-b661-4abc-bfa7-26dd293d9c12","html_url":"https://github.com/wasmCloud/actor-tinygo","commit_stats":{"total_commits":13,"total_committers":5,"mean_commits":2.6,"dds":"0.46153846153846156","last_synced_commit":"f47a9f84150e6bb63f2f5f19ff856e996f553b95"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmCloud%2Factor-tinygo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmCloud%2Factor-tinygo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmCloud%2Factor-tinygo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmCloud%2Factor-tinygo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wasmCloud","download_url":"https://codeload.github.com/wasmCloud/actor-tinygo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223842094,"owners_count":17212323,"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":["actor","actor-model","tinygo","wasm","webassembly"],"created_at":"2024-11-09T15:14:47.059Z","updated_at":"2024-11-09T15:14:47.637Z","avatar_url":"https://github.com/wasmCloud.png","language":"Go","readme":"# wasmCloud TinyGo Actor SDK\nThis module is for those looking to develop [wasmCloud](https://wasmcloud.dev) actors using [TinyGo](https://tinygo.org). Typically you won't use this module directly, as it will be referenced by one or more code generate modules containing strongly-typed structs and wrappers around function handler registration.\n\nA typical actor might look like this\n\n```go\npackage main\n\nimport (\n\t\"github.com/wasmcloud/actor-tinygo\"\n\t\"github.com/wasmcloud/interfaces/httpserver/tinygo\"\n)\n\nfunc main() {\n\t// In the main function, construct an instance of your actor, and pass in the instance,\n\t// followed by a handler for each of the interfaces you implement.\n\t// This actor responsds to http requests from the http server capability provider,\n\t// so it includes the HttpServerHandler.\n\t// All actors must include the ActorHandler and implement `HealthRequest`.\n\tme := Echo{}\n\tactor.RegisterHandlers(httpserver.HttpServerHandler(\u0026me), actor.ActorHandler(\u0026me))\n}\n\ntype Echo struct{}\n\n// HandleRequest implements the callback from the http server capability provider.\nfunc (e *Echo) HandleRequest(ctx *actor.Context, arg httpserver.HttpRequest) (*httpserver.HttpResponse, error) {\n\tr := httpserver.HttpResponse{\n\t\tStatusCode: 200,\n\t\tHeader:     make(httpserver.HeaderMap, 0),\n\t\tBody:       []byte(\"hello\"),\n\t}\n\treturn \u0026r, nil\n}\n\n// HealthRequest implements the health check from the wasmcloud host.\nfunc (e *Echo) HealthRequest(ctx *actor.Context, arg actor.HealthCheckRequest) (*actor.HealthCheckResponse, error) {\n\tvar r actor.HealthCheckResponse\n\tr.Healthy = true\n\treturn \u0026r, nil\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasmcloud%2Factor-tinygo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasmcloud%2Factor-tinygo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasmcloud%2Factor-tinygo/lists"}