{"id":16813733,"url":"https://github.com/albertoimpl/wasm-gateway-filters","last_synced_at":"2026-05-03T20:37:25.892Z","repository":{"id":86217021,"uuid":"459549382","full_name":"Albertoimpl/wasm-gateway-filters","owner":"Albertoimpl","description":"Custom Spring Cloud Gateway filter that calls a WebAssembly function written in C from a .wasm file","archived":false,"fork":false,"pushed_at":"2022-11-04T12:30:43.000Z","size":93,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-06T03:45:46.211Z","etag":null,"topics":["java","spring-cloud-gateway","wasm"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Albertoimpl.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-02-15T11:27:12.000Z","updated_at":"2022-09-21T08:26:17.000Z","dependencies_parsed_at":"2023-11-27T09:15:09.889Z","dependency_job_id":null,"html_url":"https://github.com/Albertoimpl/wasm-gateway-filters","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Albertoimpl/wasm-gateway-filters","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Albertoimpl%2Fwasm-gateway-filters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Albertoimpl%2Fwasm-gateway-filters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Albertoimpl%2Fwasm-gateway-filters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Albertoimpl%2Fwasm-gateway-filters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Albertoimpl","download_url":"https://codeload.github.com/Albertoimpl/wasm-gateway-filters/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Albertoimpl%2Fwasm-gateway-filters/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32584515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: 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":["java","spring-cloud-gateway","wasm"],"created_at":"2024-10-13T10:27:42.830Z","updated_at":"2026-05-03T20:37:25.349Z","avatar_url":"https://github.com/Albertoimpl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Cloud Gateway and WebAssembly\n\nCreating a custom Spring Cloud Gateway filter that calls a WebAssembly function written in C from a .wasm file using [wasmtime-java](https://wasmtime.dev/).\n\nTo run the project:\n```shell\n./gradlew bootRun\n```\n\nTo call the function:\n```shell\ncurl localhost:8081/wasm -H\"X-CustomSum-x:10\" -H\"X-CustomSum-y:16\" -sI | grep X-CustomSum\n\n \nX-CustomSum: 26\n```\n\nThis request will call a custom filter that will sum two digits and add it to the response headers:\n```yaml\nspring:\n  cloud:\n    gateway:\n      routes:\n        - uri: https://albertoimpl.com\n          predicates:\n            - Path=/wasm\n          filters:\n            - StripPrefix=1\n            - CustomSumWASMFilter\n```\n\nTo compile the sum function:\n\n```shell\ngit clone https://github.com/emscripten-core/emsdk.git\ncd emsdk\n./emsdk install latest\n./emsdk activate latest\nsource ./emsdk_env.sh\n```\n\n```shell\nemcc sum/sum.c -o sum/sum.js -s EXPORTED_FUNCTIONS='[\"_sum\"]'\n```\n\n```shell\ncp sum/sum.wasm src/main/resources/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertoimpl%2Fwasm-gateway-filters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbertoimpl%2Fwasm-gateway-filters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertoimpl%2Fwasm-gateway-filters/lists"}