Build script with multiple files?

You can specify the root file using the package.build entry in Cargo.toml,then put its submodules in the same folder.

Example:

Cargo.toml

[package]
name = "foo"
version = "0.1.0"
build="build/main.rs"

Crate folder:

build/main.rs
build/submodule1.rs
build/submodule2.rs
src/lib.rs
Cargo.toml

build/main.rs:

mod submodule1;
mod submodule2;

fn main(){}

If you want to see a crate with a multi-file build script you can look here.