[Standard] Is there any way to import dynamically generated Rust files without causing conflicts with the IDE?

My doubt is, is there any official way to use a file generated dynamically by another program or crate without inhibiting the IDE's functionality?
I currently use include! to insert the file generated by the bindgen but this prevents the IDE from helping me, either by informing the type in detail, where the type is defined, the fields, the signature and other information that would speed up the development.
I am using a series of scripts to copy the result from bindgen to src and update lib.rs, awk and bash, and it works but it is not portable and it is something else to keep.
Is there a portable and friendly way with the IDE to use dynamically generated files?

The developer of rust-analyzer is planning to make this work better in the future; see this thread for some related discussion: Running build.rs in rust-analyzer - tools and infrastructure - Rust Internals

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.