emk / heroku-buildpack-rust

A buildpack for Rust applications on Heroku, with full support for Rustup, cargo and build caching.
522 stars 186 forks source link

export database URL #21

Closed steveklabnik closed 7 years ago

steveklabnik commented 7 years ago

So, I don't know if you want to do this universally or not, but exposing a way to let me do this would be cool.

Specifically, Diesel does compile-time checking of the database schema, so we need access to the DB during build.

emk commented 7 years ago

Looks great! Thank you!

I really wish there was some way to dump the database schema and allow diesel to access it from a file at compile time. Lots of production Rust users will probably want to build using CI tools or in Docker containers, and they may not want to provide database access during compiles. But diesel is important enough to the "Rust on the web" story right now that I'm willing to work around this in the buildpack. Thank you for the PR!