{"id":16114896,"url":"https://github.com/asaaki/rust-wasm-on-lambda-edge","last_synced_at":"2025-03-16T08:32:43.557Z","repository":{"id":36989517,"uuid":"330229743","full_name":"asaaki/rust-wasm-on-lambda-edge","owner":"asaaki","description":"Rust/WASM on AWS Lambda@Edge (CloudFront)","archived":false,"fork":false,"pushed_at":"2025-03-10T00:23:30.000Z","size":1661,"stargazers_count":31,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-16T00:02:06.092Z","etag":null,"topics":["aws","aws-cloudfront","aws-lambda","aws-lambda-edge","cloudfront","nodejs","rust","rust-lang","wasm","wasm-bindgen","wasm-pack"],"latest_commit_sha":null,"homepage":"https://markentier.tech/posts/2021/01/rust-wasm-on-aws-lambda-edge/","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/asaaki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2021-01-16T18:30:49.000Z","updated_at":"2025-03-10T00:23:34.000Z","dependencies_parsed_at":"2023-12-19T04:06:22.681Z","dependency_job_id":"be90ccba-bf90-43fd-88c5-303bc9653f74","html_url":"https://github.com/asaaki/rust-wasm-on-lambda-edge","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/asaaki%2Frust-wasm-on-lambda-edge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asaaki%2Frust-wasm-on-lambda-edge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asaaki%2Frust-wasm-on-lambda-edge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asaaki%2Frust-wasm-on-lambda-edge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asaaki","download_url":"https://codeload.github.com/asaaki/rust-wasm-on-lambda-edge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243807464,"owners_count":20350999,"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":["aws","aws-cloudfront","aws-lambda","aws-lambda-edge","cloudfront","nodejs","rust","rust-lang","wasm","wasm-bindgen","wasm-pack"],"created_at":"2024-10-09T20:16:24.744Z","updated_at":"2025-03-16T08:32:43.133Z","avatar_url":"https://github.com/asaaki.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust/Wasm on AWS Lambda@Edge (CloudFront)\n\n**Read the accompanying [blog post][mt-post] to this project.**\n\nSince we still cannot have native Rust (or WebAssembly for that matter) on AWS Lambda@Edge, we have to come up with our own solution.\nHere I present mine: using the AWS Lambda Node.js enviroment to execute our Wasm blob generated from Rust code.\n\n## tl;dr\n\n```sh\nmake build\nmake call\nmake zip\n# upload to your AWS Lambda and attach it to a CloudFront distribution (as viewer request trigger)\n# check the Cloudwatch logs in the regions you made requests\n# be happy - Have a nice day!\n```\n\nThis demo doesn't do anything fancy. In fact, it does not alter the request at all and only passes it through as-is.\n\nThe function will make a few log statements, check the Cloudwatch logs in the regions you received requests for your CloudFront distribution.\n\nThis setup is good to test for the baseline performance.\n\nAfter the cold-start some requests later the function duration should be **around 1 to 2 ms.**\n\nDepending on the region and where you are, this translates to 40 to 50 ms in request latency for a small static asset,\nwhile without any trigger attached the same request would take around 25 ms.\n\n## License\n\n\u003csup\u003e\nLicensed under either of \u003ca href=\"LICENSE-APACHE\"\u003eApache License, Version\n2.0\u003c/a\u003e or \u003ca href=\"LICENSE-MIT\"\u003eMIT license\u003c/a\u003e at your option.\n\u003c/sup\u003e\n\n\u003cbr/\u003e\n\n\u003csub\u003e\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this crate by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\u003c/sub\u003e\n\n\n\n\u003c!-- links --\u003e\n[mt-post]: https://markentier.tech/posts/2021/01/rust-wasm-on-aws-lambda-edge/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasaaki%2Frust-wasm-on-lambda-edge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasaaki%2Frust-wasm-on-lambda-edge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasaaki%2Frust-wasm-on-lambda-edge/lists"}