iliana / rust-crowbar

Wrapper to simplify writing AWS Lambda functions in Rust (using the Python execution environment)
https://docs.rs/crowbar
Apache License 2.0
197 stars 16 forks source link

Consider mashup crate to dynamic cpython ident usage in macros #50

Open softprops opened 5 years ago

softprops commented 5 years ago

I'm working on improving the developer experience with lando which inherits much from crowbar

One thing that's bothered me about both is the default dependence on using the lib name "lambda" due to cpython expectations that bleed into our macro usage

I recently discovered the mashup crate which now makes what we'd need work with concat_idents! on stable rust. I submitted a pull to ensure that would work with something like that builds idents from env vars we can resolve in cargos build process to resolve the package name. The effect this has on users is they no longer need to specify a "magic" lib name and when they which to use another lib it won't require updating their crowbar/lambda lambda source code to do so as we do now with lib{crate}, initlib{crate}, PyInit_lib{crate}. There is one blocker I found while putting this into practice with lando which I've already opened a pull to address

This is a bit early but I wanted to get in your your radar @ilianaw

iliana commented 5 years ago

:+1:

Tentatively adding to the 0.4.0 milestone but if you'd like me to move it let me know.

softprops commented 5 years ago

My other hyphen fix I'm mashup got merged and published today. I did some testing today but I'll do bit more over the weekend. It's been a nice experience improvent for me so far!