Skip to content

build: refactor build.rs

Yaroslav Dynnikov requested to merge build-rs into master
  1. build: remove version check

    • We haven't used rustc < 1.61 for a long time.
  2. build: simplify running shell commands

    • Provide a supplementary Run trait for the std::process::Command.
  3. build: refactor build.rs

    • Remove build dependency on cmake crate. It doesn't fulfill all our needs, so we run cmake directly via std::process::command. It also makes build.rs easier to understand.
    • Arrange paths variable names.
  4. build: refactor build.rs more

    • Encapsulate printing rustc flags in their own mod.
    • Arrange paths formatting.
  5. build: explain build tree structure

    • Also remove unnecessary intermediate build directory
    // The file structure roughly looks as follows:
    // .
    // ├── build.rs                         // you are here
    // ├── src/
    // ├── tarantool-sys
    // │   └── static-build
    // │       └── CMakeLists.txt
    // └── <target-dir>/<build-type>/build  // <- build_root
    //     ├── picodata-<smth>/out          // <- out_dir
    //     ├── tarantool-http
    //     └── tarantool-sys
    //         ├── ncurses-prefix
    //         ├── openssl-prefix
    //         ├── readline-prefix
    //         └── tarantool-prefix
    //
Edited by Yaroslav Dynnikov

Merge request reports