{"id":13647686,"url":"https://github.com/deislabs/wagi","last_synced_at":"2025-04-12T20:46:07.580Z","repository":{"id":37621016,"uuid":"302774423","full_name":"deislabs/wagi","owner":"deislabs","description":"Write HTTP handlers in WebAssembly with a minimal amount of work","archived":false,"fork":false,"pushed_at":"2022-06-15T16:22:16.000Z","size":4394,"stargazers_count":899,"open_issues_count":25,"forks_count":45,"subscribers_count":32,"default_branch":"main","last_synced_at":"2025-04-04T00:10:05.685Z","etag":null,"topics":["cgi","wasi","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/deislabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-09T23:31:40.000Z","updated_at":"2025-04-03T07:09:28.000Z","dependencies_parsed_at":"2022-09-24T01:33:29.232Z","dependency_job_id":null,"html_url":"https://github.com/deislabs/wagi","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fwagi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fwagi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fwagi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fwagi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deislabs","download_url":"https://codeload.github.com/deislabs/wagi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631701,"owners_count":21136559,"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":["cgi","wasi","wasm","webassembly"],"created_at":"2024-08-02T01:03:42.620Z","updated_at":"2025-04-12T20:46:07.556Z","avatar_url":"https://github.com/deislabs.png","language":"Rust","funding_links":[],"categories":["Rust","webassembly","优秀项目与工具"],"sub_categories":["WASM 应用框架"],"readme":"# WAGI: WebAssembly Gateway Interface\n\n_WAGI is the easiest way to get started writing WebAssembly microservices and web apps._\n\n**WARNING:** This is experimental code.\nIt is not considered production-grade by its developers, neither is it \"supported\" software.\n\n\u003e DeisLabs is experimenting with many WASM technologies right now.\n\u003e This is one of a multitude of projects (including [Krustlet](https://github.com/deislabs/krustlet))\n\u003e designed to test the limits of WebAssembly as a cloud-based runtime.\n\n## tl;dr\n\nWAGI allows you to run WebAssembly WASI binaries as HTTP handlers.\nWrite a \"command line\" application that prints a few headers, and compile it to `WASM32-WASI`.\nAdd an entry to the `modules.toml` matching URL to WASM module.\nThat's it.\n\nYou can use any programming language that can compile to `WASM32-WASI`.\n\n## Quickstart\n\nHere's the fastest way to try out WAGI.\nFor details, checkout out the [documentation](docs/README.md).\n\n1. Get the [latest binary release](https://github.com/deislabs/wagi/releases)\n2. Unpack it `tar -zxf wagi-VERSION-OS.tar.gz`\n3. Run the `wagi --help` command\n\nIf you would like to try out a few simple configurations, we recommend cloning this repository\nand then using the `examples` directory:\n\n```console\n$ wagi -c examples/modules.toml\nNo log_dir specified, using temporary directory /var/folders/hk/l1mlxz1x01x9yl33ll9vh9980000gp/T/.tmpx55XkJ for logs\n```\n\nThis will start WAGI on `http://localhost:3000`. Use a browser or a tool like `curl` to test:\n\n```\n$ curl -v http://localhost:3000/hello/world\n*   Trying 127.0.0.1...\n* TCP_NODELAY set\n* Connected to localhost (127.0.0.1) port 3000 (#0)\n\u003e GET /hello/world HTTP/1.1\n\u003e Host: localhost:3000\n\u003e User-Agent: curl/7.64.1\n\u003e Accept: */*\n\u003e\n\u003c HTTP/1.1 200 OK\n\u003c content-type: text/html; charset=UTF-8\n\u003c content-length: 12\n\u003c date: Wed, 14 Oct 2020 22:00:59 GMT\n\u003c\nhello world\n* Connection #0 to host localhost left intact\n* Closing connection 0\n```\n\nTo add your own modules, compile your code to `wasm32-wasi` format and add them to the `modules.toml` file.\nCheck out our [Yo-Wasm](https://github.com/deislabs/yo-wasm/) project for a quick way to build Wasm modules in a variety of languages.\n\n### Examples and Demos\n\nWagi is an implementation of CGI for WebAssembly.\nThat means that writing a Wagi module is as easy as sending properly formatted content to standard output.\nIf you want to understand the details, read the [Common Gateway Interface 1.1](https://tools.ietf.org/html/rfc3875) specification.\n\nTake a look at the [Wagi Examples Repository](https://github.com/deislabs/wagi-examples) for examples in various languages.\n\nFor a \"production grade\" (whatever that means for a pre-release project) module, checkout out the [Wagi Fileserver](https://github.com/deislabs/wagi-fileserver): A fileserver written in Grain, compiled to Wasm, and ready to run in Wagi.\n\n## Contributing\n\nWant to chat?\nWe hang out in the [#krustlet](https://kubernetes.slack.com/messages/krustlet) channel of the [Kubernetes Slack](https://kubernetes.slack.com).\n\nWAGI is experimental, and we welcome contributions to improve the project.\nIn fact, we're delighted that you're even reading this section of the docs!\n\nFor bug fixes:\n\n- Please, pretty please, file issues for anything you find. This is a new project, and we are SURE there are some bugs to work out.\n- If you want to write some code, feel free to open PRs to fix issues. You may want to drop a comment on the issue to let us know you're working on it (so we don't duplicate effort).\n\nFor refactors and tests:\n\n- We welcome any changes to improve performance, clean up code, add tests, etc.\n- For style/idiom guidelines, we follow the same conventions as [Krustlet](https://github.com/deislabs/krustlet)\n\nFor features:\n\n- If there is already an issue for that feature, please let us know in the comments if you plan on working on it.\n- If you have a new idea, file an issue describing it, and we will happily discuss it.\n\nSince this is an experimental repository, we might be a little slow to answer.\n\n## Code of Conduct\n\nThis project has adopted the [Microsoft Open Source Code of\nConduct](https://opensource.microsoft.com/codeofconduct/).\n\nFor more information see the [Code of Conduct\nFAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact\n[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeislabs%2Fwagi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeislabs%2Fwagi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeislabs%2Fwagi/lists"}