diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2024-10-04 10:48:59 -0700 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2024-10-04 23:07:38 +0300 |
| commit | 9575ed30abba70508749d69a9f601e2c6ed657c2 (patch) | |
| tree | 806fa21b87f37e0c5be0bd051a9ca78764d24063 | |
| parent | eda59e141d30204908ef1f56b2637164310c9ccc (diff) | |
| download | meson-9575ed30abba70508749d69a9f601e2c6ed657c2.tar.gz | |
docs: Mention that rust edition/standard 2018 or later should be used
As the 2018 standard changes the way rust handles externs, and is the
first edition that allows `--extern crate=path` to completely replace
(in all but a few corner cases) the use of `extern crate` in the rust
files.
| -rw-r--r-- | docs/markdown/Rust.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/markdown/Rust.md b/docs/markdown/Rust.md index 74f68442c..d30fe6837 100644 --- a/docs/markdown/Rust.md +++ b/docs/markdown/Rust.md @@ -10,7 +10,9 @@ short-description: Working with Rust in Meson Meson can't track dependency information for crates linked by rustc as a result of `extern crate` statements in Rust source code. If your crate dependencies are properly expressed in Meson, there should be no -need for `extern crate` statements in your Rust code. +need for `extern crate` statements in your Rust code, as long as you use the +Rust 2018 edition or later. This means adding `rust_std=2018` (or later) to the +`project(default_options)` argument. An example of the problems with `extern crate` is that if you delete a crate from a Meson build file, other crates that depend on that crate |
