softprops / serverless-rust

⚡ 🦀 a serverless framework plugin for rustlang applications
https://www.npmjs.com/package/serverless-rust
MIT License
541 stars 81 forks source link

Using nightly Rust #42

Closed sd2k closed 4 years ago

sd2k commented 5 years ago

Hi! This project is awesome, so easy to get up and running, so thanks for all your work!

Is it possible to override the version of Rust used to build the functions, e.g. to use a nightly version?

softprops commented 5 years ago

This has been on my mind but has been a lower priority because most of the lambda work I do depends on a reliable build environment.

Nightly rust is expressly not committed to being a stable environment to build on. That said, I'm empathetic to those that also just want to experiment with features that aren't yet complete. I'll keep this issue as a reminder of that since I don't already have an issue up for rust.

sd2k commented 5 years ago

Fair enough. I've managed to factor some things out into separate crates now meaning nightly is no longer required, so no problem!

For anyone finding this on Google in the meantime, it's fairly simple to fork this repo and clone it to the '.serverless-plugins' directory of your project and change the Docker image/tag in index.js; I also forked/cloned your lambda-rust project to use nightly in the Dockerfile. (The same process can be used for any required static libraries, e.g. libpq).

softprops commented 5 years ago

You can actually just declare the docker tag in serverless.yml https://github.com/softprops/serverless-rust/blob/master/README.md#%EF%B8%8F-customize