Skip to content
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

Support for Rust Lambda function with Cargo #67

Closed
wants to merge 2 commits into from
Closed

Support for Rust Lambda function with Cargo #67

wants to merge 2 commits into from

Conversation

sapessi
Copy link

@sapessi sapessi commented Jan 4, 2019

Description of changes: Added a new rust_cargo workflow. Uses cargo build --release by default to compile the function and automatically renames the executable to bootstrap. If the processing is running on a non-linux system the build process automatically attempts to target x86_64-unknown-linux-musl. The copy source steps looks for both the bootstrap executable and a runtime_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.

@sapessi sapessi requested a review from sanathkr January 4, 2019 22:46
@sapessi
Copy link
Author

sapessi commented Jan 5, 2019

I'll work on unit tests over the next few days

@jfuss jfuss closed this Mar 15, 2019
@jfuss jfuss reopened this Mar 15, 2019
@jesskfullwood
Copy link

jesskfullwood commented May 1, 2019

Has this PR stalled? If so I would be interested in taking it on

@sanathkr
Copy link
Contributor

sanathkr commented May 3, 2019

@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.

@sanathkr
Copy link
Contributor

sanathkr commented May 3, 2019

@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

@jackric
Copy link

jackric commented May 22, 2020

@jesskfullwood @sanathkr is this stalled? I want it in SAM; I may take it on

@ramosbugs
Copy link

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 aws-sam-cli to make it usable? That part seems to require primarily changing https:/awslabs/aws-sam-cli/blob/98be672418f76bf1cc54db7528988b8a1c6a6b52/samcli/lib/build/workflow_config.py#L213 to

"provided": ManifestWorkflowSelector([PROVIDED_MAKE_CONFIG, RUST_CARGO_CONFIG])

@sanathkr Does that seem to match what you had in mind above?

@sriram-mv
Copy link
Contributor

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

@ramosbugs
Copy link

great, that seems like a more flexible solution than special-casing Rust. I'll just use that, thanks!

@sriram-mv sriram-mv closed this May 26, 2020
hawflau added a commit to hawflau/aws-lambda-builders that referenced this pull request Nov 10, 2023
* 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:/astral-sh/ruff) from 0.0.284 to 0.0.287.
- [Release notes](https:/astral-sh/ruff/releases)
- [Changelog](https:/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:/actions/checkout) from 3 to 4.
- [Release notes](https:/actions/checkout/releases)
- [Changelog](https:/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:/psf/black) from 23.3.0 to 23.7.0.
- [Release notes](https:/psf/black/releases)
- [Changelog](https:/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:/psf/black) from 23.7.0 to 23.9.1.
- [Release notes](https:/psf/black/releases)
- [Changelog](https:/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:/astral-sh/ruff) from 0.0.287 to 0.0.288.
- [Release notes](https:/astral-sh/ruff/releases)
- [Changelog](https:/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:/eliben/pyelftools) to permit the latest version.
- [Changelog](https:/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:/nedbat/coveragepy) from 7.2.7 to 7.3.1.
- [Release notes](https:/nedbat/coveragepy/releases)
- [Changelog](https:/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:/astral-sh/ruff) from 0.0.288 to 0.0.290.
- [Release notes](https:/astral-sh/ruff/releases)
- [Changelog](https:/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]>
github-merge-queue bot pushed a commit that referenced this pull request Nov 10, 2023
* 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:/astral-sh/ruff) from 0.0.284 to 0.0.287.
- [Release notes](https:/astral-sh/ruff/releases)
- [Changelog](https:/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:/actions/checkout) from 3 to 4.
- [Release notes](https:/actions/checkout/releases)
- [Changelog](https:/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:/psf/black) from 23.3.0 to 23.7.0.
- [Release notes](https:/psf/black/releases)
- [Changelog](https:/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:/psf/black) from 23.7.0 to 23.9.1.
- [Release notes](https:/psf/black/releases)
- [Changelog](https:/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:/astral-sh/ruff) from 0.0.287 to 0.0.288.
- [Release notes](https:/astral-sh/ruff/releases)
- [Changelog](https:/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:/eliben/pyelftools) to permit the latest version.
- [Changelog](https:/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:/nedbat/coveragepy) from 7.2.7 to 7.3.1.
- [Release notes](https:/nedbat/coveragepy/releases)
- [Changelog](https:/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:/astral-sh/ruff) from 0.0.288 to 0.0.290.
- [Release notes](https:/astral-sh/ruff/releases)
- [Changelog](https:/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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants