devbox-build
Small utility library for writing Rust build sripts (build.rs).
It contains a collection of types that should make writing of build sripts a bit easier. It focuses on file manipulation and generation while checking file stamps to avoid unnecessary build steps. It can replace makefiles for simple things like copying some files and invoking some external compiler or tool like NPM when things have changes.
Most methods do not return a Result but simply panic with consistent error messages stoping
Cargo build which is desired behaviour for build sripts in most cases. For situations when
you do want to recover from errors or implement a better error reporting most method have a twin
method suffixed with '_result' that return Result
values instead.
To install via umbrella devbox crate
[]
= { = "0.1" }
Example
Example build sripts builds a web application located in project root/webapp
inside the target
directory using NPM by installing all JS dependencies and running build script through NPM.
Built web app is then embedded into Rust binary by packing it as a Rust source code. All
the steps are done only on clean builds or when relevant resources change since last build.
License
Licensed under MIT license (LICENSE or https://opensource.org/licenses/MIT)
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Devbox by you, shall be licensed as MIT, without any additional terms or conditions.