I need to use a deprecated project which does no longer runs using newer versions of stable versions of rustc, but which requires nightly features for being able to use avx512 in order to be able to complete in an acceptable time frame.
The past stable builds of the rust compiler are found in GitHub but where to find past nightly toolchain builds ?
You can download old nightlies. For example rustup toolchain install nightly-2018-10-26, downloads the nightly for 1.30.0 (I'm not sure, just typed the date on the announcement post + 1 day because the exact date didn't have a toolchain available for me).
There's also an option to use features on stable builds. Do not use that, it is intended for development of rustc itself, but if you set the environment variable RUSTC_BOOTSTRAP=1 rustc will allow unstable features on stable builds.
Related
I was playing with Rust when I encountered a bug inside a cargo projects source code, I changed the code to fix the bug and recompiled the project but it was still using the old code which made me think.
Is Rust compiling the source code of a cargo package on my machine or does the result come from the cloud? If it is compiled on my machine is it only done once? Where are the results? If they are compiled in the Cloud how does that maintain compatibility between versions (of Rust) if the binary is static? Or are is there a binary for each Rust version?
Cargo only compiles code on the local machine- there is no built-in support for downloading pre-built Rust binaries from the Internet. You can find the source code of dependencies you have used in ~/.cargo/registry/src (Linux path). Cargo places all of the generated binary files in your project's target directory; It doesn't even reuse dependencies compiled on the local machine.
However, by installing and using sccache, you actually can share dependency binaries either between local projects and the cloud.
For your particular case of editing a dependency locally, you want to use the technique of Overriding Dependencies to patch the source code locally. Cargo doesn't check for changes when the code is edited in-cache, and thus you won't see anything change from in-place patches.
Finally, the per-crate .rlib files Cargo generates in target/debug/deps are equivalent to C object files- they need to all be linked together to produce a valid executable or library. The ABI between them is dependent on the Rust version, which is why switching toolchains will cause them all to be rebuilt.
I am working on a project where a dependency requires a specific nightly feature. I need to use this lib, but I am afraid that if I compile the project with nightly, I could depend on nother libraries that include another unstable feature dependency and I wouldn't be aware of that.
Is it possible to compile the library that I need using nightly (while set the nightly version to version that already merged to the release branch) to some kind of "lib.a" file, and compile the whole project on stable release while linking to "lib.a"?
No, you cannot do this.
See also:
Is there any way to get unstable features on the compiler versions in stable or beta?
Is there a way to use unstable modules from Rust stable?
I've got a Rust project I build with the 1.33 tool chain. I need to add a dependency on a crate that can only be built with Rust nightly, how can I specify in the dependencies it should be built with nightly?
You cannot. Rust does not have a stable ABI and it is not possible to mix crates built with different versions of the compiler within the same project. As of 2019, there is no plan to stabilize the ABI.
You must compile the entire project using a nightly compiler which you can do using rustup.
The Node.JS website says the current version is 0.10.26, but the git repo has much newer versions going up to 0.11.12.
Is there something wrong with the later versions, are they unstable?
Why does the website say 0.10.26 is the current version?
From the Node.js wiki:
Odd versions are unstable, even versions are stable. v0.2 and v0.4 are even/stable. v0.3 and v0.5 are odd/unstable. The current stable series is v0.10.x. The next stable series will be v0.12.x. The stable branch takes bug fixes only - it does not change the JavaScript API, addon API, nor ABI (you don't have to rebuild modules after upgrading node with-in a stable branch).
You should use stable versions for production. The web site displays prominently and gives links to download the latest stable verson.
However, if you are trying to stay ahead of the curve and prepare for the next and yet unreleased stable version, then testing against an unstable version makes sense. This is why the unstable versions are also available to developers.
Are Resharper nightly builds free for use in a commercial project?
I cannot find this information on jetbrans' site.
Every nightly build contains a trial license that usually expires in 30 days. It also contains a time bomb that triggers in ~45 days after publishing.
Other than these time limits, there's nothing that prevents you from using nightly builds in production.
Permanent licenses from previous
versions may or may not work with
nightly builds:
If your license
makes you eligible for the same major
version (4.x, 5.x etc.) that the
current nightly builds belong to (for
example, we've made available early
access programs for 5.1, 5.1.1, and
5.1.2), your license key will work with nightly builds.
If you own a
5.x license purchased April 25, 2011 or earlier, it won't work with 6.x
nightly builds, in which case you'll
still be able to use a 30-day free
evaluation period with each 6.x
nightly build.
If you own a 5.x
license purchased on April 26, 2011
or later, your license key should
work with 6.x.
No, the nightly builds are just trial versions unless you have a valid product key. If you have a 5.X product key, it will work with the 6.0 nightly builds.