MCPcopy Index your code
hub / github.com/cargo-lambda/cargo-lambda-cdk / bundlingOptionsFromRustFunctionProps

Function bundlingOptionsFromRustFunctionProps

src/util.ts:26–41  ·  view source on GitHub ↗
(props?: RustFunctionProps)

Source from the content-addressed store, hash-verified

24}
25
26export function bundlingOptionsFromRustFunctionProps(props?: RustFunctionProps): BundlingOptions {
27 if (props?.bundling?.architecture && props?.architecture && props?.bundling?.architecture !== props?.architecture) {
28 throw new Error(
29 `Architecture mismatch: the architecture for bundling (${props.bundling.architecture.name} ) didn't match the architecture of the underlying lambda (${props.architecture.name}).`,
30 );
31 }
32 const architecture = props?.bundling?.architecture
33 ? props?.bundling?.architecture
34 : props?.architecture
35 ? props?.architecture
36 : lambda.Architecture.X86_64;
37 return {
38 ...props?.bundling,
39 architecture,
40 };
41}

Callers 2

constructorMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected