-
Notifications
You must be signed in to change notification settings - Fork 144
Support for Rust Lambda function with Cargo #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'll work on unit tests over the next few days |
Has this PR stalled? If so I would be interested in taking it on |
@jesskfullwood Yes, it would be great if you can pick up this PR. It just some work to become compatible with latest interface of the Workflow/Builder classes. You can follow the other workflows as an example for the pattern. It should be straightforward. |
@jesskfullwood To make this work with SAM CLI, you need to make a code change to automatically pick up the Rust builder based on the presence of Cargo manifest as I explained here - aws/aws-sam-cli#1099 (comment) Let me know how we can help you with this |
@jesskfullwood @sanathkr is this stalled? I want it in SAM; I may take it on |
I've been wondering the same thing! Started working on reviving this PR last night, and hoping to have a new PR out early next week. But if someone beats me to it, great :-) It sounds like the main missing piece is test coverage? Hopefully the Workflow/Builder interface changes alluded to above will become obvious as I continue trying to get this to work. And then once this change gets merged we need a separate PR for
@sanathkr Does that seem to match what you had in mind above? |
there is now a makefile builder workflow that can be directly https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/building-custom-runtimes.html |
great, that seems like a more flexible solution than special-casing Rust. I'll just use that, thanks! |
* Add nodejs20.x support * fix: Fix missing encoding when logging from Makefile (aws#535) * Fix missing encoding when logging from Makefile * Add comment explaining why stderr * Undo testing code * Version bump to 1.37.0 (aws#537) * Support PEP 600 platform tags for arm64 (aws#536) Co-authored-by: Daniel Mil <[email protected]> * chore(deps-dev): bump ruff from 0.0.284 to 0.0.287 in /requirements (aws#539) Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.284 to 0.0.287. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](astral-sh/ruff@v0.0.284...v0.0.287) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump actions/checkout from 3 to 4 (aws#538) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump black from 23.3.0 to 23.7.0 in /requirements (aws#534) * chore(deps-dev): bump black from 23.3.0 to 23.7.0 in /requirements Bumps [black](https://github.com/psf/black) from 23.3.0 to 23.7.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](psf/black@23.3.0...23.7.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Update requirements/dev.txt --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Wing Fung Lau <[email protected]> * chore(deps-dev): bump black from 23.7.0 to 23.9.1 in /requirements (aws#543) Bumps [black](https://github.com/psf/black) from 23.7.0 to 23.9.1. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](psf/black@23.7.0...23.9.1) --- updated-dependencies: - dependency-name: black dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump ruff from 0.0.287 to 0.0.288 in /requirements (aws#542) Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.287 to 0.0.288. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](astral-sh/ruff@v0.0.287...v0.0.288) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): update pyelftools requirement in /requirements (aws#540) Updates the requirements on [pyelftools](https://github.com/eliben/pyelftools) to permit the latest version. - [Changelog](https://github.com/eliben/pyelftools/blob/master/CHANGES) - [Commits](eliben/pyelftools@v0.29...v0.30) --- updated-dependencies: - dependency-name: pyelftools dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump coverage from 7.2.7 to 7.3.1 in /requirements (aws#541) * chore(deps-dev): bump coverage from 7.2.7 to 7.3.1 in /requirements Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.2.7 to 7.3.1. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](nedbat/coveragepy@7.2.7...7.3.1) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * fix: set coverage versions based on python versions - since coverage 7.3.x python3.7 support has been dropped. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sriram Madapusi Vasudevan <[email protected]> Co-authored-by: Sriram Madapusi Vasudevan <[email protected]> * chore: Version Bump 1.38.0 (aws#544) * chore(deps-dev): bump ruff from 0.0.288 to 0.0.290 in /requirements (aws#545) Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.288 to 0.0.290. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](astral-sh/ruff@v0.0.288...v0.0.290) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update github action to install nodejs 20 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Lucas <[email protected]> Co-authored-by: Daniel Mil <[email protected]> Co-authored-by: jack-davies <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Wing Fung Lau <[email protected]> Co-authored-by: Sriram Madapusi Vasudevan <[email protected]> Co-authored-by: Sriram Madapusi Vasudevan <[email protected]> Co-authored-by: Mohamed Elasmar <[email protected]> Co-authored-by: Mohamed ElAsmar <[email protected]>
* Add nodejs20.x support * fix: Fix missing encoding when logging from Makefile (#535) * Fix missing encoding when logging from Makefile * Add comment explaining why stderr * Undo testing code * Version bump to 1.37.0 (#537) * Support PEP 600 platform tags for arm64 (#536) * chore(deps-dev): bump ruff from 0.0.284 to 0.0.287 in /requirements (#539) Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.284 to 0.0.287. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](astral-sh/ruff@v0.0.284...v0.0.287) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... * chore(deps): bump actions/checkout from 3 to 4 (#538) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... * chore(deps-dev): bump black from 23.3.0 to 23.7.0 in /requirements (#534) * chore(deps-dev): bump black from 23.3.0 to 23.7.0 in /requirements Bumps [black](https://github.com/psf/black) from 23.3.0 to 23.7.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](psf/black@23.3.0...23.7.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:development update-type: version-update:semver-minor ... * Update requirements/dev.txt --------- * chore(deps-dev): bump black from 23.7.0 to 23.9.1 in /requirements (#543) Bumps [black](https://github.com/psf/black) from 23.7.0 to 23.9.1. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](psf/black@23.7.0...23.9.1) --- updated-dependencies: - dependency-name: black dependency-type: direct:development update-type: version-update:semver-minor ... * chore(deps-dev): bump ruff from 0.0.287 to 0.0.288 in /requirements (#542) Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.287 to 0.0.288. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](astral-sh/ruff@v0.0.287...v0.0.288) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... * chore(deps-dev): update pyelftools requirement in /requirements (#540) Updates the requirements on [pyelftools](https://github.com/eliben/pyelftools) to permit the latest version. - [Changelog](https://github.com/eliben/pyelftools/blob/master/CHANGES) - [Commits](eliben/pyelftools@v0.29...v0.30) --- updated-dependencies: - dependency-name: pyelftools dependency-type: direct:development ... * chore(deps-dev): bump coverage from 7.2.7 to 7.3.1 in /requirements (#541) * chore(deps-dev): bump coverage from 7.2.7 to 7.3.1 in /requirements Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.2.7 to 7.3.1. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](nedbat/coveragepy@7.2.7...7.3.1) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:development update-type: version-update:semver-minor ... * fix: set coverage versions based on python versions - since coverage 7.3.x python3.7 support has been dropped. --------- * chore: Version Bump 1.38.0 (#544) * chore(deps-dev): bump ruff from 0.0.288 to 0.0.290 in /requirements (#545) Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.288 to 0.0.290. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](astral-sh/ruff@v0.0.288...v0.0.290) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... * Update github action to install nodejs 20 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Andrea Culot <[email protected]> Co-authored-by: Lucas <[email protected]> Co-authored-by: Daniel Mil <[email protected]> Co-authored-by: jack-davies <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sriram Madapusi Vasudevan <[email protected]> Co-authored-by: Sriram Madapusi Vasudevan <[email protected]> Co-authored-by: Mohamed Elasmar <[email protected]> Co-authored-by: Mohamed ElAsmar <[email protected]>
Description of changes: Added a new
rust_cargo
workflow. Usescargo build --release
by default to compile the function and automatically renames the executable tobootstrap
. If the processing is running on a non-linux system the build process automatically attempts to targetx86_64-unknown-linux-musl
. The copy source steps looks for both thebootstrap
executable and aruntime_release
metadata file if it is available.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.