Re: [PATCH v5 0/9] Introduce Rust and announce that it will become mandatory
- From
Ramsay Jones <ramsay@ramsayjones.plus.com>
- Date
- Sep 17, 2025, 18:32 UTC
- Message-ID
- <20044de2-3a72-4888-a380-fa35e5a224c4@ramsayjones.plus.com>
- In-Reply-To
- <CAH=ZcbA47pzMu9VsrTC2Ni9_RN6iPKmaaDNNxSvx1dtroza+Mg@mail.gmail.com>
On 17/09/2025 00:38, Ezekiel Newren wrote:
Show 23 quoted lines
> On Tue, Sep 16, 2025 at 5:05 PM Ramsay Jones > <ramsay@ramsayjones.plus.com> wrote: >> I meant to mention during the initial 'xdiff series' that running >> the build_rust.sh script failed for me on Linux Mint 22.2, because: >> >> $ rustc --version >> rustc 1.75.0 (82e1608df 2023-12-21) (built from a source tarball) >> $ cargo --version >> cargo 1.75.0 >> $ rustup --version >> Command 'rustup' not found, but can be installed with: >> sudo apt install rustup >> $ >> >> [if you try to install rustup, it offers to remove rustc and cargo!] > > The parts of my CI code that use rustup should not be interpreted as > the right or wrong way to acquire rustc + cargo. So long as the > distribution you're using has an appropriate rustc and cargo version > then it doesn't matter. The reason why I used rustup in the github > workflows is because rustup makes it easy to install different > toolchains. rustc and cargo are released in lockstep so it's confusing > when they're not both part of the same package in a distro.
Ah, sorry, I was not very clear. The 'build_rust.sh' script unconditionally uses the rustup command, assuming that every developer has it installed, but not all devs _will_ have it installed (relying on their distro's packages for rustc and cargo).
If memory serves (and it may not), rustup was only used to determine if the current platform was windows (so that it could set the library file extension to '*.a' or '*.lib'). It should not be too difficult to find some other means to determine that. (famous last words!)
Show 14 quoted lines
> >> Also: >> >> $ cbindgen --version >> Command 'cbindgen' not found, but can be installed with: >> sudo apt install cbindgen >> $ >> >> [I haven't tried installing cbindgen, so I don't know if it would uninstall >> rustc and cargo :) ] > > Again this is confusing because cbindgen is a crate that can be > installed via 'cargo install cbindgen` and then run as `cbindgen`. I > think it would be worthwhile to go over some Rust terminology:
So, is the (I guess debian) cbindgen package an executable or a crate? (can you execute a crate?). BTW the package version is 0.26.0-3.
ATB, Ramsay Jones