INNER CODE UNIT · JavaScript
RustPlugin
softprops/serverless-rust · index.js:30
class RustPlugin {
constructor(serverless, options) {
this.serverless = serverless;
this.options = options;
this.servicePath = this.serverless.config.servicePath || "";
this.hooks = {
"before:package:createDeploymentArtifacts": this.build.bind(this),
"before:deploy:function:packageFunction": this.build.bind(this),
"before:offline:start": this.build.bind(this),
"before:offline:start:init": this.build.bind(this),
};
if (includeInvokeHook(serverless.version)) {
this.hooks["before:invoke:local:invoke"] = this.build.bind(this);
}
this.custom = Object.assign(
{
cargoFlags: "",
dockerTag: DEFAULT_DOCKER_TAG,