Skip to content

Conversation

@shinglyu
Copy link

Issue #, if available: N/A

Description of changes:
Added a Cargo.toml example for the example code in README. This helps new users get started with the example easier.

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

edition = "2021"
[dependencies]
lambda_runtime = "*"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using "*" to avoid having to update this README everytime a new version is released.

Copy link
Contributor

@calavera calavera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to document how to get started using cargo and cargo-lambda than maintaining this static code. Telling people to use '*' as dependency is not a great general practice, and people won't think twice to copy it.

Generating a valid project is as easy as running cargo lambda new, see this documentation. Or, if people don't want to use cargo-lambda, we can also say "run cargo new, copy the code inside, and add the lambda_runtime dependency to the generated Cargo.toml".

@calavera
Copy link
Contributor

Thanks for opening helping us improve our docs!

I've added new information to get started in #484. I'm going to close this PR for the time being.

@calavera calavera closed this May 21, 2022
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.

2 participants