softprops / lambda-rust

🐳 🦀 a dockerized lambda build env for rust applications
MIT License
162 stars 76 forks source link

Add install, build and packages hooks. #59

Closed bernardobelchior closed 4 years ago

bernardobelchior commented 4 years ago

This PR adds the install, build and packages hooks (#6).

This is WIP, but already includes the functionality and tests. If the implementation looks good, I'll add some documentation.

The new process would be:

  1. Install dependencies passed in $@
  2. Run install hook
  3. Run cargo build
  4. Run build hook
  5. Package lambda
  6. Run package hook

What I'm not sure here is whether hooks should be run in this order, or if they should replace the normal process altogether, rather than extending it.

Would like some opinions here.

softprops commented 4 years ago

What I'm not sure here is whether hooks should be run in this order, or if they should replace the normal process altogether, rather than extending it.

I think this is a good start. What I'm more interested most in is if this solves your initial problem. I care more that it's solving a problem that how ideal it might be for some future case that may or may not exist. I like that thinks work as is with no configuration, so I like what you did here.

bernardobelchior commented 4 years ago

I have tested with my use case (installing and packaging a native dependency) and things seem to work! I'll set this PR a ready for review.