Currently, the build.rs file uses cc::Build to build the static library (.a file), but it does not automatically inherit some build configurations from the parent project (such as C++ standard, optimization level, custom compiler flags, include paths, macro definitions, etc). This means build options required by the parent project may not be correctly passed through to the cxx static library, leading to inconsistencies.
Steps to reproduce:
- The parent project sets custom CXXFLAGS or a specific C++ standard, but the cxx .a is not actually built with these flags.
- It's necessary to patch or fork cxx to add logic for inheriting configuration.
I hope the official implementation could support this type of integration, or at least clarify best practices for propagating build settings from the parent project.