/wasmtest

Testing AWS Rust SDK in WASM

Primary LanguagePython

This repo contains an example of running the AWS Rust SDK compiled to WASM in two language runtimes, Node and Python. It achieves this by defining some utility functions was WebAssembly components, which are implemented in the host language and used to provide system integration for the WASM sandbox. Currently the required utils are an http-client to perform the network calls, a time-client to provide the system time, a print-client to send output to sdtdout, and a creds-client for providing the environment's AWS credentials. These utils are currently implemented in JavaScript and in Python and demos are provided for each. The demo calls the DynamoDB listTables API, so you will need at least one Dynamo table in your account to see any useful output.

To run this example you need the following dependencies installed:

To successfully run the example you will need the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and the AWS_SESSION_TOKEN environment variables set.

To build the project, from the root of the project, run the following command:

make build

To execute the Node demo run:

node index.mjs

To execute the Python demo run:

python demo.py