by pjmlp · 10y ago · 0 comments
How come can I advocate Rust to serious enterprise customers, if I have to justify using nightlies to make use of such tooling?
Apparently downvoting every time someone mentions the issue with nightly being required is fair.
Examples? Examples that aren't tools, that is. The main example I can think of is serde, and that works on stable (just works better on nightly).
What's wrong with nightly for using tooling? You don't have to keep updating, you can pin to a nightly from a particular date. You can use rustup.rs to switch to stable locally if you need to.
I said it's unfair, because gcc has worse issues here, and everyone probably agrees that gcc is "enterprise ready".
Usually it is set in stone and only updated every few IT upgrade cycles.
What the devs get on their machines is that and nothing more.
I've worked in bad places where it was hard to upgrade to the latest version of a language, but at least that was always under full control of the Dev group.
You come in, develop the modules you were hired for, using the existing stack and leave for the next gig.
This is why regardless how good someone might brag about his/her C and C++ skills, they don't scale in this type of environments.
Would you really want every developer installing their favourite tools/libs and having a complete free-for-all when you've got 200+ devs, each with their own opinions and preferences?
IT have to support this stuff, they don't want to be rebuilding the software stack every six months or so.
With respect, the Rust community is extremely in-exposed to the majority of actual enterprise environments, and that's ok.
Honestly the best path forward is to just acknowledge it, say "we are working on it" and you'll get your point across better.
Again with respect, because you all do really amazing work, fighting it honestly makes you and the whole community come across ignorant.
GCC is in that respect "enterprise ready" because it very likely was installed on the system already. And probably not the latest version either.
The GCC plugin for afl requires you to find the right GCC sources and compile against those (unless you use the hacky, less-awesome assembly based afl). This solution is available to you for afl-rs too, just not documented because using a nightly is easier. This makes afl-rs just as bad as GCC in this aspect. afl-rs needs a nightly not because it only works on specific versions, but because it hooks into the compiler in a way that is only allowed on nightly. Thus it will work on any nightly, even that from a few weeks ago, but it must be a nightly. As I mentioned it is possible to get it to work if you are willing to do what GCC does.
I sincerely doubt any enterprise level distribution will make that the primary source of obtaining a rust compiler. I would bet good money that Red Hat won't. It's counter to most of the reason enterprise distributions exist in the first place, which is a stable (often at the cost of many other feature) base on which to build and support. If they aren't doing this, they aren't an enterprise distribution. This goes as far as Red Hat back-porting bug-fixes to 7 year old versions of utilities and libraries, because any change .needs to be backwards compatible at all cost. Additionally, there's the question of ensuring that all relevant portions of the rust install are removed on package removal.
At the same time, getting the source and every patch applied to it, and the complete compile instruction for a package is generally very easy. It's meant to be repeatable. For Red Hat, you just get the appropriate srpm instead of rpm, and that unpacks a source tarball and any associated patches separated, along with an rpmbuild config that contains all the info used to build an rpm package from them. Every single thing, including the kernel is built this way.
That's not to say rustup won't possibly be shipped as an extra utility, in one of th emain rust packages or as a separate one, but it definitely won't be the primary method most distributions provide for rust development (in the case of the non-enterprise distros, because it's just not as convenient as saying "install rust" and having it just be there, in a confirmed tested version that works with whatever other packaged tooling they provide. There are downsides to this, but there are also many benefits.
> Note: You must be using nightly Rust release. If you're using multirust, which is highly recommended, switch with multirust default nightly command.
https://github.com/thoughtpolice/afl/commit/e54c0237e934d734...
There was seemingly no interest at all in upstreaming this when I asked the afl-dev mailing list. My hope was that along with afl-clang-fast it could, in time, completely subsume the hacky `afl-gcc` and `afl-clang` scripts, making afl much faster, more robust and more portable out of the box (I initially tested on POWER8 machines). This component is under GPLv3, so it might possibly be due to licensing concerns. My other changes were accepted upstream (posted at a similar time), so that's just a speculative guess.
People are seemingly interested in this and I've seen this question pop up a few times since authoring the code originally. Perhaps it is worth maintaining a fork or patchset for wider availability... The above code works, but is less efficient than `afl-clang-fast` and strictly proof of concept. Neither of those are insurmountable. In fact because this code works on GIMPLE very directly, I see no reason why it couldn't work for things like gccgo or gcj, or even GNU Ada or FORTRAN, I suppose, with some tweaks.
Interestingly, a team at Oracle seems to have (at a similar, or later time) reinvented this same thing when they attempted to fuzz the Linux kernel with afl. But that source code doesn't exist publicly, it seems. Mine may not have even been suitable for them, even if they knew of it beforehand.
I am sure many people want this to exist. Tons of codebases are gcc-only and having proper GCC fuzzing is important.
I guess the idea is to dissuade people from using hacks to enable unstable features -- this will break things which depend on the library. If a library compiles on stable, it should never break due to a compiler upgrade.
(Tooling doesn't have this problem, it doesn't come into play when it's used on a dependency)