7
7
const { spawnSync } = require ( 'child_process' ) ;
8
8
const path = require ( 'path' ) ;
9
9
10
+ const DEFAULT_DOCKER_TAG = '0.2.0-rust-1.31.0' ;
10
11
const RUST_RUNTIME = 'rust' ;
11
12
const BASE_RUNTIME = 'provided' ;
12
13
const NO_OUTPUT_CAPTURE = { stdio : [ 'ignore' , process . stdout , process . stderr ] } ;
@@ -25,7 +26,7 @@ class RustPlugin {
25
26
this . custom = Object . assign (
26
27
{
27
28
cargoFlags : "" ,
28
- dockerTag : "0.2.0-rust-1.31.0"
29
+ dockerTag : DEFAULT_DOCKER_TAG
29
30
} ,
30
31
this . serverless . service . custom && this . serverless . service . custom . rust || { }
31
32
) ;
@@ -94,7 +95,6 @@ class RustPlugin {
94
95
return ;
95
96
}
96
97
rustFunctionsFound = true ;
97
- // reserve `cargoPackage` for future support of cargo workspaces
98
98
let [ cargoPackage , binary ] = func . handler . split ( '.' ) ;
99
99
if ( binary == undefined ) {
100
100
binary = cargoPackage ;
@@ -105,12 +105,12 @@ class RustPlugin {
105
105
this . serverless . cli . log ( `Dockerized Rust build encountered an error: ${ res . error } ${ res . status } .` ) ;
106
106
throw new Error ( res . error ) ;
107
107
}
108
- // If all is well we should now have find a packaged compiled binary under target/lambda/release.
108
+ // If all went well, we should now have find a packaged compiled binary under ` target/lambda/release` .
109
109
//
110
110
// The AWS "provided" lambda runtime requires executables to be named
111
111
// "bootstrap" -- https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html
112
112
//
113
- // To avoid artifact name conflicts when we potentially have more than one function
113
+ // To avoid artifact nameing conflicts when we potentially have more than one function
114
114
// we leverage the ability to declare a package artifact directly
115
115
// see https://serverless.com/framework/docs/providers/aws/guide/packaging/
116
116
// for more information
0 commit comments