6 releases (breaking)

0.4.0 Feb 17, 2020
0.3.0 Nov 2, 2019
0.2.0 Oct 27, 2019
0.1.1 Sep 12, 2019
0.0.0 Jan 7, 2019

#1080 in Development tools

Download history 204/week @ 2023-11-27 211/week @ 2023-12-04 263/week @ 2023-12-11 572/week @ 2023-12-18 245/week @ 2023-12-25 156/week @ 2024-01-01 274/week @ 2024-01-08 381/week @ 2024-01-15 128/week @ 2024-01-22 141/week @ 2024-01-29 220/week @ 2024-02-05 283/week @ 2024-02-12 215/week @ 2024-02-19 328/week @ 2024-02-26 278/week @ 2024-03-04 157/week @ 2024-03-11

1,041 downloads per month
Used in 218 crates (2 directly)

MIT/Apache

76KB
1.5K SLoC

Implementation of ritual's build script. Default generated build script uses this crate as a build dependency and just calls ritual_build::run(). If a custom build script is used, it should either use the same call to execute all operations normally or use Config type to change the build script's settings.

See README of the repository root for more information.

Crates generated by ritual require multiple custom build operations:

  • Apply extra build configuration passed via environment variables (RITUAL_LIBRARY_PATH, RITUAL_FRAMEWORK_PATH, RITUAL_INCLUDE_PATH);
  • Select active build configuration based on current target;
  • Build the C++ wrapper library;
  • Generate ffi.rs file with actual linking attributes;
  • Determine sizes of C++ types with stack allocation place;
  • Print cargo attributes required for linking the crate. It appears a common task to perform other custom operations in the build script, so all the above operations are implemented as a separate crate which is used as build dependency of the default generated build script. If a custom build script is defined, it should use this crate's API to perform the necessary build operations.

Dependencies

~4–6MB
~115K SLoC