4

IntelliJ Rust Changelog #181

 1 year ago
source link: https://intellij-rust.github.io/2022/10/24/changelog-181.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

New Features

#9532 Enable build script evaluation by default. Now the plugin builds and executes all build scripts in the project (including build scripts in external dependencies) during project model loading to create source code generated during compilation and collect information about generated environment variables and cfg options. A typical use case is to generate some code by a build script and include it via include!(concat!(env!("OUT_DIR"), "/path_to_generated_file.rs")). Now the plugin understands where generated sources are located and includes them into its own analysis. Under the hood, build script evaluation uses cargo check call modified in a way to compile and execute only host code (i.e. only build scripts and procedural macros as well as their dependencies). Besides execution of build scripts code, it also allows the plugin to compile all procedural macro libraries which is required for procedural macro expansion. Note, procedural macro expansion is still disabled by default. To turn it on, enable org.rust.macros.proc experimental feature.

Read more about build scripts and how to work with them in Rust plugin in the corresponding blog post


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK