The Config::build() method automatically emits the cargo directive cargo:root=. Please provide a method to disable this behavior, e.g., Config::emit_cargo_root(bool).
The default Config instance would emit cargo:root= to make this change backwards-compatible, and a call to config.emit_cargo_root(false) would avoid emitting the directive.