{"id":20840330,"url":"https://github.com/kong/ngx_wasm_module","last_synced_at":"2025-10-04T05:47:53.383Z","repository":{"id":181946610,"uuid":"355988312","full_name":"Kong/ngx_wasm_module","owner":"Kong","description":"Nginx + WebAssembly","archived":false,"fork":false,"pushed_at":"2025-05-01T11:56:36.000Z","size":3155,"stargazers_count":112,"open_issues_count":9,"forks_count":11,"subscribers_count":27,"default_branch":"main","last_synced_at":"2025-05-19T00:06:51.395Z","etag":null,"topics":["assemblyscript","go","nginx","proxy-wasm","rust","wasi","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"C","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/Kong.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-08T17:03:07.000Z","updated_at":"2025-05-15T08:24:37.000Z","dependencies_parsed_at":"2023-10-03T04:15:37.202Z","dependency_job_id":"367eee9b-c7db-40dd-b127-8985f0a3c416","html_url":"https://github.com/Kong/ngx_wasm_module","commit_stats":null,"previous_names":["kong/ngx_wasm_module"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/Kong/ngx_wasm_module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kong%2Fngx_wasm_module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kong%2Fngx_wasm_module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kong%2Fngx_wasm_module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kong%2Fngx_wasm_module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kong","download_url":"https://codeload.github.com/Kong/ngx_wasm_module/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kong%2Fngx_wasm_module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278271563,"owners_count":25959521,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["assemblyscript","go","nginx","proxy-wasm","rust","wasi","wasm","webassembly"],"created_at":"2024-11-18T01:16:01.471Z","updated_at":"2025-10-04T05:47:53.368Z","avatar_url":"https://github.com/Kong.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"WasmX logo\" src=\"assets/vectors/logo.svg\" style=\"width:140px;\" /\u003e\n\u003c/p\u003e\n\n# WasmX/ngx_wasm_module\n\n\u003e Nginx + WebAssembly\n\nThis module enables the embedding of [WebAssembly] runtimes inside of\n[Nginx](https://nginx.org/) and aims at offering several host SDK abstractions\nfor the purpose of extending and/or introspecting the Nginx web-server/proxy\nruntime.\n\nCurrently, the module implements a [Proxy-Wasm](https://github.com/proxy-wasm/spec)\nhost ABI, which allows the use of client SDKs written in multiple languages,\nsuch as [Rust](https://github.com/proxy-wasm/proxy-wasm-rust-sdk)\nand [Go](https://github.com/tetratelabs/proxy-wasm-go-sdk). Proxy-Wasm\n(\"WebAssembly for Proxies\") is an emerging standard for Wasm filters,\nadopted by API Gateways such as [Kong](https://konghq.com)\nand [Envoy](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/wasm_filter.html).\n\n## What is WasmX?\n\nWasmX aims at extending Nginx for the modern Web infrastructure. This includes\nsupporting WebAssembly runtimes \u0026 SDKs (by way of ngx_wasm_module), and\ngenerally increasing the breadth of features relied upon by the API Gateway\nuse-case (i.e. reverse-proxying). See [CONTRIBUTING.md](CONTRIBUTING.md)\nfor additional background and roadmap information.\n\n## Table of Contents\n\n- [Synopsis](#synopsis)\n- [Examples](#examples)\n- [Documentation](#documentation)\n    - [Usage](#usage)\n    - [Installation](#installation)\n    - [Development](#development)\n    - [Proxy-Wasm SDK](#proxy-wasm-sdk)\n    - [WebAssembly](#webassembly)\n    - [WebAssembly Runtimes](#webassembly-runtimes)\n- [License](#license)\n\n## Synopsis\n\n```nginx\n# nginx.conf\nevents {}\n\n# nginx master process gets a default 'main' VM\n# a new top-level configuration block receives all configuration for this main VM\nwasm {\n    #      [name]    [path.{wasm,wat}]\n    module my_filter /path/to/filter.wasm;\n    module my_module /path/to/module.wasm;\n}\n\n# each nginx worker process is able to instantiate wasm modules in its subsystems\nhttp {\n    server {\n        listen 9000;\n\n        location / {\n            # execute a proxy-wasm filter when proxying\n            #           [module]\n            proxy_wasm  my_filter;\n\n            # execute more WebAssembly during the access phase\n            #           [phase] [module]  [function]\n            wasm_call   access  my_module check_something;\n\n            proxy_pass  ...;\n        }\n    }\n\n    # other directives\n    wasm_socket_connect_timeout 60s;\n    wasm_socket_send_timeout    60s;\n    wasm_socket_read_timeout    60s;\n\n    wasm_socket_buffer_size     8k;\n    wasm_socket_large_buffers   32 16k;\n}\n```\n\n[Back to TOC](#table-of-contents)\n\n## Examples\n\nSeveral \"showcase filters\" are provided as examples by authors of this module:\n\n- [proxy-wasm-rust-filter-echo](https://github.com/wasmx-proxy/proxy-wasm-rust-filter-echo/):\n  An httpbin/echo filter.\n- [proxy-wasm-rust-rate-limiting](https://github.com/Kong/proxy-wasm-rust-rate-limiting):\n  Kong Gateway inspired rate-limiting in Rust.\n- [proxy-wasm-go-rate-limiting](https://github.com/Kong/proxy-wasm-go-rate-limiting):\n  Kong Gateway inspired rate-limiting in Go.\n- [proxy-wasm-assemblyscript-rate-limiting](https://github.com/Kong/proxy-wasm-assemblyscript-rate-limiting):\n  Kong Gateway inspired rate-limiting in AssemblyScript.\n\nMore examples are available for each Proxy-Wasm SDK:\n\n- [AssemblyScript\n  examples (temporary SDK fork)](https://github.com/Kong/proxy-wasm-assemblyscript-sdk/tree/master/examples)\n- [C++\n  examples](https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/tree/master/example)\n- [Go (TinyGo)\n  examples](https://github.com/tetratelabs/proxy-wasm-go-sdk/tree/main/examples)\n- [Rust\n  examples](https://github.com/proxy-wasm/proxy-wasm-rust-sdk/tree/master/examples)\n\nNote that all of the above examples may not yet be compatible with\nngx_wasm_module.\n\nLast but not least, the [WebAssembly\nHub](https://www.webassemblyhub.io/repositories/) contains many other Proxy-Wasm\nfilters, some of which may not yet be compatible with ngx_wasm_module.\n\n[Back to TOC](#table-of-contents)\n\n## Documentation\n\n### Usage\n\nSee the [user documentation](docs/README.md) for resources on this module's\nusage.\n\n[Back to TOC](#table-of-contents)\n\n### Installation\n\nReleases are published in three distinct release channels:\n\n- **Release**: Stable releases. A *prerelease* is considered stable and promoted\n  to a *release* based on usage mileage and feedback.\n- **Prerelease**: Unstable releases. All new release versions (e.g.\n  `release-1.0.0`) are first introduced through prereleases (i.e.\n  `prerelease-1.0.0-beta1`) before being promoted to a stable release.\n- **Nightly**: Releases cut from the latest `main` branch. Presently, nightly\n  releases are built every Monday. The release interval may change in the\n  future. See the [Nightly release\n  tag](https://github.com/Kong/ngx_wasm_module/releases/tag/nightly) to download\n  released artifacts.\n\nEach release channel produces the following artifacts for each release:\n\n- `ngx_wasm_module-$release.tar.gz`: a tarball of the ngx_wasm_module release.\n  To be compiled alongside Nginx with `--add-module=` or\n  `--add-dynamic-module=`.\n- `wasmx-$release-$runtime-$arch-$os.tar.gz`: a pre-compiled `nginx` executable\n  built with ngx_wasm_module for the specified runtime/architecture/OS. Download\n  these releases and instantly use the `nginx` binary.\n\nSee the [installation documentation](docs/INSTALL.md) for instructions on how to\ninstall this module or use one of the binary releases.\n\n[Back to TOC](#table-of-contents)\n\n### Development\n\nSee the [developer documentation](docs/DEVELOPER.md) for developer resources on\nbuilding this module from source and other general development processes.\n\nSee a term you are unfamiliar with? Consult the [code\nlexicon](docs/DEVELOPER.md#code-lexicon).\n\nFor a primer on the code's layout and architecture, see the [code\nlayout](docs/DEVELOPER.md#code-layout) section.\n\n[Back to TOC](#table-of-contents)\n\n### Proxy-Wasm SDK\n\nThe [Proxy-Wasm SDK](https://github.com/proxy-wasm/spec) is the initial focus of\nWasmX/ngx_wasm_module development and is still a work in progress. You can\nbrowse [PROXY_WASM.md](docs/PROXY_WASM.md) for a guide on Proxy-Wasm support in\nngx_wasm_module.\n\nFor a reliable resource in an evolving ABI specification, you may also wish to\nconsult the SDK source of the language of your choice in the [Proxy-Wasm SDKs\nlist](https://github.com/proxy-wasm/spec#sdks).\n\n[Back to TOC](#table-of-contents)\n\n### WebAssembly\n\n- WebAssembly Specification (Wasm): https://webassembly.github.io/spec/core/index.html\n- WebAssembly System Interface (WASI): https://github.com/WebAssembly/WASI\n- WebAssembly text format (`.wat`): https://developer.mozilla.org/en-US/docs/WebAssembly/Understanding_the_text_format\n\n[Back to TOC](#table-of-contents)\n\n### WebAssembly Runtimes\n\n- Wasm C API: https://github.com/WebAssembly/wasm-c-api\n- Wasmer C API: https://docs.rs/wasmer-c-api/\n- Wasmtime C API: https://docs.wasmtime.dev/c-api/\n- V8 embedding: https://v8.dev/docs/embed\n\n[Back to TOC](#table-of-contents)\n\n## License\n\n```\nCopyright 2020-2024 Kong Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n[Back to TOC](#table-of-contents)\n\n[WebAssembly]: https://webassembly.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkong%2Fngx_wasm_module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkong%2Fngx_wasm_module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkong%2Fngx_wasm_module/lists"}