An example of how to use Emscripten to compile C code to WebAssembly and run it in AWS Lambda
https://5fmdwn6crdimchpxeywfphd75y0jrdcg.lambda-url.us-east-1.on.aws/
- https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm
- https://emscripten.org/docs/getting_started/Tutorial.html
- https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#interacting-with-code-ccall-cwrap
- https://web.dev/emscripten-npm/
- https://dev.to/azure/embedding-emscripten-in-a-nodejs-library-3hdm
- https://www.cncf.io/blog/2021/08/25/webassembly-serverless-functions-in-aws-lambda/
- https://timdaub.github.io/2021/02/25/emscripten-wasm/
- https://web.dev/emscripting-a-c-library/
git clone git@github.com:facutk/emscriptem-lambda.git
- AWS
- export AWS credentials
- test command:
aws sts get-caller-identity --profile <profile-name>
- Lambda function name
emscripten-lambda
- Github
- Configure repo secrets using
env.example
file
- Configure repo secrets using
- Local
- .env file
- install act
brew install act
- run the action
act --secret-file .env