JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 76
  • Score
    100M100P100Q59706F
  • License MIT

Serverless framework plugin for Rustlang applications

Package Exports

  • serverless-rust

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-rust) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

serverless rust Build Status npm

A ⚡ Serverless framework ⚡ plugin for Rustlang applications 🦀

📦 Install

Install the plugin with npm

$ npm install serverless-rust@0.1.1

💡 This serverless plugin assumes you are building Rustlang lambdas using the lando or crowbar crates.

Add the following to your serverless project's serverless.yaml file

service: demo
provider:
  name: aws
  # crowbar and lando integrate with aws lambda's python3.6 runtime
  runtime: python3.6
plugins:
  # this adds informs servleress to use
  # the serverless-rust plugin
  - serverless-rust
# the follow is recommended for small deployment sizes
# (faster uploads)
package:
  individually: true
  exclude:
    - ./**
functions:
  test:
    # liblambda.handler is the default function name when
    # you follow lando/crowbar conventions
    handler: liblamda.handler
    # the following limits the function packaging
    # to just the resulting binary
    package:
      include:
        - liblambda.so
    events:
      - http:
          path: /test
          method: GET

🖍️ customize

You can optionally adjust the default settings of the dockerized build env using a custom section of your serverless.yaml configuration

custom:
  # this section customizes the default
  # serverless-rust plugin settings
  rust:
    # flags passed to cargo
    cargoFlags: '--features lando/python3-sys'
    # custom docker tag
    dockerTag: 'some-custom-tag'