Skip to content

Commit 63274fe

Browse files
author
github-actions
committed
chore(release): v0.0.21
1 parent d740109 commit 63274fe

File tree

5 files changed

+27
-3
lines changed

5 files changed

+27
-3
lines changed

cargolambdacdk/BundlingOptions.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ type BundlingOptions struct {
3434
// the default is `CUSTOM`.
3535
//
3636
AssetHashType awscdk.AssetHashType `field:"optional" json:"assetHashType" yaml:"assetHashType"`
37+
// Additional list of flags to pass to `cargo lambda build`.
38+
CargoLambdaFlags *[]*string `field:"optional" json:"cargoLambdaFlags" yaml:"cargoLambdaFlags"`
3739
// Command hooks.
3840
// Default: - do not run additional commands.
3941
//

cargolambdacdk/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,28 @@ new RustFunction(this, 'Rust function', {
8787
});
8888
```
8989

90+
### Cargo Lambda Build flags
91+
92+
Use the `cargoLambdaFlags` option to add additional flags to the `cargo lambda build` command that's executed to bundle your function. You don't need to use this flag to set options like the target architecture or the binary to compile, since the construct infers those from other props.
93+
94+
If these flags include a `--target` flag, it will override the `architecture` option. If these flags include a `--release` or `--debug` flag, it will override the CDK's debug option.
95+
96+
```go
97+
import { RustFunction } from 'cargo-lambda-cdk';
98+
99+
new RustFunction(this, 'Rust function', {
100+
manifestPath: 'path/to/package/directory/with/Cargo.toml',
101+
bundling: {
102+
cargoLambdaFlags: [
103+
'--target',
104+
'x86_64-unknown-linux-musl',
105+
'--debug',
106+
'--disable-optimizations',
107+
],
108+
},
109+
});
110+
```
111+
90112
### Docker
91113

92114
To force bundling in a docker container even if `Cargo Lambda` is available in your environment, set the `forcedDockerBundling` prop to `true`. This is useful if you want to make sure that your function is built in a consistent Lambda compatible environment.
7.7 MB
Binary file not shown.

cargolambdacdk/jsii/jsii.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
constructs "github.com/aws/constructs-go/constructs/v10/jsii"
1414
)
1515

16-
//go:embed cargo-lambda-cdk-0.0.20.tgz
16+
//go:embed cargo-lambda-cdk-0.0.21.tgz
1717
var tarball []byte
1818

1919
// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module.
@@ -24,5 +24,5 @@ func Initialize() {
2424
constructs.Initialize()
2525

2626
// Load this library into the kernel
27-
_jsii_.Load("cargo-lambda-cdk", "0.0.20", tarball)
27+
_jsii_.Load("cargo-lambda-cdk", "0.0.21", tarball)
2828
}

cargolambdacdk/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.20
1+
0.0.21

0 commit comments

Comments
 (0)