Skip to content

Conversation

@bnusunny
Copy link
Contributor

@bnusunny bnusunny commented Dec 22, 2025

Which issue(s) does this change fix?

Why is this change necessary?

Lambda Rust Runtime is General Available. We need to graduate Rust cargo-lambda support from experimental.

How does it address the issue?

Remove the experimental/beta flag requirement for building Rust functions with the rust-cargolambda build method. Users no longer need to pass --beta-features or set SAM_CLI_BETA_RUST_CARGO_LAMBDA=1 to build Rust Lambda functions.

Changes:

  • Remove RustCargoLambda from ExperimentalFlag class
  • Remove _check_rust_cargo_experimental_flag() method from BuildContext
  • Update integration tests to not require beta_features flag
  • Update unit tests to remove mock for deleted method

What side effects does this change have?

Mandatory Checklist

PRs will only be reviewed after checklist is complete

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@bnusunny bnusunny requested a review from a team as a code owner December 22, 2025 20:10
@github-actions github-actions bot added area/build sam build command pr/internal labels Dec 22, 2025
@bnusunny bnusunny force-pushed the move_rust_outof_experimental branch from f229671 to 5d67b74 Compare December 22, 2025 20:14
@bnusunny bnusunny closed this Dec 22, 2025
@bnusunny bnusunny reopened this Dec 22, 2025
Remove the experimental/beta flag requirement for building Rust functions
with the rust-cargolambda build method. Users no longer need to pass
--beta-features or set SAM_CLI_BETA_RUST_CARGO_LAMBDA=1 to build Rust
Lambda functions.

Changes:
- Remove RustCargoLambda from ExperimentalFlag class
- Remove _check_rust_cargo_experimental_flag() method from BuildContext
- Update integration tests to not require beta_features flag
- Update unit tests to remove mock for deleted method
@bnusunny bnusunny force-pushed the move_rust_outof_experimental branch from 5d67b74 to 23f5ed0 Compare December 22, 2025 20:23
@roger-zhangg
Copy link
Member

Error: Cargo Lambda failed: Feature flag experimentalCargoLambda must be enabled to use this workflow
seems there are more to remove

- Add CargoLambda to ExperimentalFlag with persistent=True
- Update is_experimental_enabled() to always return True for persistent flags
- Update unit tests for new flag count and persistent behavior
@bnusunny
Copy link
Contributor Author

Fixed now.

Comment on lines +57 to +60
# CargoLambda is no longer experimental - always enabled
CargoLambda = ExperimentalEntry(
"experimentalCargoLambda", EXPERIMENTAL_ENV_VAR_PREFIX + "CARGO_LAMBDA", persistent=True
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this something we should remove in Lambda Builders instead (or Lambda Builders first)? Here: https://github.com/aws/aws-lambda-builders/blob/1d2de0531053ef5b24e1332c976b198090dbeafe/aws_lambda_builders/workflows/rust_cargo/workflow.py#L39-L43

We don't need to keep this CargoLambda flag here if lambda-builders doesn't check for the flag over there, and we don't need to add the "persistent" field.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that it would be better to remove the flag rather than mark the beta flag as perpetually true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build sam build command pr/internal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants