Add an option to compile code in a Docker container #7
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
The goal here is quite simple, but ideally we want to provide a way for users to compile rust code in a containerized manner, perhaps leveraging Docker and an Amazon Linux build image. If the host machine doesn't have
rustup
orcargo-zigbuild
installed, we should by default use Docker to build and compile rust code.The end goal would probably be to find a suitable Docker container, so if the container for example has
zigbuild
andzig
already installed, that would be ideal; though of course if the architecture in the Docker container matches the target, then there's a chance we might not needzigbuild
in such a case.We could also take inspiration from other similar NPM libraries such as aws-lambda-go, which does also support building code in a Docker environment.
Docker Image
For the actual Docker image to use, I'm still open to suggestions as mentioned above, so ideally an image that comes with tools like
cargo-zigbuild
andcross
already installed. I think an excellent starting point would be to look into the image that softprops/lambda-rust provides:https://github.com/softprops/lambda-rust
The text was updated successfully, but these errors were encountered: