The compatiblearchitectures property is not available in RustExtension, so it always compiles for x64.
A workaround is to manually specify the architecture flag in the bundling property:
constmyExtension=newRustExtension(this,"MyExtension",{manifestPath: join(__dirname,"..","layers/my-extension","Cargo.toml",),bundling: {cargoLambdaFlags: ["--quiet","--arm64"]},},);It would be more convenient to introduce an architecture property that accepts either Architecture.X86_64 (default) or Architecture.ARM_64. Setting this property would not only automatically add the --arm64 flag but also configure the layer correctly in the AWS Console:

The
compatiblearchitecturesproperty is not available inRustExtension, so it always compiles for x64.A workaround is to manually specify the architecture flag in the
bundlingproperty:It would be more convenient to introduce an
architectureproperty that accepts eitherArchitecture.X86_64(default) orArchitecture.ARM_64. Setting this property would not only automatically add the--arm64flag but also configure the layer correctly in the AWS Console: