rust-sourcebundler
Bundle the source code of a rust cargo crate in a single source file.
Very useful for sending the source code to a competitive programming site that accept only a single file (codingame, I'm looking at you) and still keeping the cargo structure locally.
Usage
Add the following snippet to your Cargo.toml:
[]
(...)
= "build.rs"
[]
= { = "https://github.com/lpenz/rust-sourcebundler" }
And create the file build.rs with the following:
//! Bundle mybin.rs and the crate libraries into singlefile.rs
use Path;
extern crate rustsourcebundler;
use Bundler;
You can use the code inside the example directory of this repository as a starting point.
Similar Projects
- slava-sh/rust-bundler
- Endle/rust-bundler-cp
- MarcosCosmos/cg-rust-bundler written in python