3 ms·
> Rust needs to mature a little more, stop changing so fast, and move further toward being old and boring. Didn't make any sense at any point post 1.0. Rust 1.
by masklinn 5y ago
> Rust needs to mature a little more, stop changing so fast, and move further toward being old and boring.
Didn't make any sense at any point post 1.0. Rust 1.0 code still works today modulo BC breaks required to fix unsoundnesses.
> Rust needs to demonstrate that it can be used to create general-purpose libraries that are callable from all other programming languages.
Also didn't make much sense at any point as the story there was always straightforward. But efforts like librsvg have pretty much demonstrated that (interestingly the libsrvg conversion effort started around the time that page was created, circa 2017).
> Rust needs to demonstrate that it can produce object code that works on obscure embedded devices, including devices that lack an operating system.
Rust is used in a bunch of embedded contexts. Whether Rust can produce object code that works on your embedded device is a more debatable question, depends on the existence (and quality) of the proper llvm backend.
I think there's also a gcc frontend in the works, but I expect it's essentially nowhere yet as it was only just started (few months old I think?). Though I believe it has financial support and a fair amount of manpower. I believe there's also an even more recent effort for a gcc backend in rustc.
So yeah this one I'd say there's limited progress yet but things seem to be moving in the right direction and picking up.
> Rust needs to pick up the necessary tooling that enables one to do 100% branch coverage testing of the compiled binaries.
Unclear what the issue is there so no idea.
> Rust needs a mechanism to recover gracefully from OOM errors.
That was always possible by working no_std, though of course required reimplementing your own abstractions.
With the linux kernel integration effort, a lot more work is going into "fallible allocation" APIs, and thus the ability to gracefully recover from allocation failures.
> Rust needs to demonstrate that it can do the kinds of work that C does in SQLite without a significant speed penalty.
¯\_(ツ)_/¯
- tptacek 5y agoThe branch coverage thing is a weird, artificial-seeming requirement that all the branches in the compiled code --- not the code as written, but the code ultimately produced by the compiler --- be testable. In other words: if the compiler generates a bounds check anywhere, it should be possible to test what happens when that specific bounds check fails. The problem is that sane Rust code doesn't give you all the tools you'd need to deliberately trip all the checks the compiler generates, because that is part of the point of being a safe language.
- masklinn 5y agoRight so really more of an expressivity issue: the compiler is not smart enough to remove all branches which can not happen in a given program, so some of those branches will be completely untestable despite being in the final object code e.g. have a vec![_;4], structurally use it such that the index can only be in-bounds, the compiler may not be able to elide the OOB checks because it might not understand they're unnecessary for real-world code.
- tptacek 5y agoFrankly, I think it's a pretty silly concern.
- cormacrelf 5y agoIt's substantially less silly than a small-time JavaScript component library adding 100% branch coverage testing requirements as a blocker to accepting a PR. But they do it for the same reason, to be able to advertise it and demonstrate reliability. This is how the sqlite project makes money. I guess someone's got to build the instrumentation tools that let them keep doing this, sounds like it won't be them. (Edit: not sure who else would have the motivation, to be honest. If they had to pioneer one thing, it should be that.)
- infogulch 5y ago> The branch coverage thing is a weird, artificial-seeming requirement Yes that's because it's a requirement designed by a standards body. I found a paper "Is 100% Test Coverage a Reasonable Requirement? Lessons Learned from a Space Software Project" (2017) that mentions that 100% branch coverage is a requirement in European Cooperation for Space Standardization (ECSS) for Class A software (where failure could result in loss of life, etc). The paper concluded: > Our findings include that there seems to be a break-even point between 80% and 95%, and everything beyond this points is increasingly costly and could introduce new project risks—which confirms findings reported so far in literature (Section 5). However, the interview revealed that, still, 100% coverage can be a reasonable quality requirement; even though a 100% requirement is not a good indicator for the software quality as such. https://www.researchgate.net/publication/319141355_Is_100_Test_Coverage_a_Reasonable_Requirement_Lessons_Learned_from_a_Space_Software_Project https://www.researchgate.net/publication/319141355_Is_100_Te... It doesn't follow that because rust is a safe language that it cannot expose test harnesses that would enable 100% branch coverage. Personally I'm ambivalent on this, maybe it's not useful, but it doesn't seem bad either. But your reaction to this requirement seems weird, like the "fox and the grapes" fable... You can't get 100%-branch coverage, so you give up and claim that 100% branch coverage is dumb, why would anyone want that anyway? Do you really think that 100% branch coverage testing should be unavailable to rust programmers if that's what they need (for whatever reason, including meeting some admittedly arbitrary standard)?
- tick_tock_tick 5y ago> depends on the existence (and quality) of the proper llvm backend LLVM's support is really quite lacking that this issue alone is enough of a justification for a project like SQLite to be written in C. The rust-gcc effort you mentioned will hopefully solve this. Quite a few of the others really are they just don't want to be pioneers which is really quite fair.
- deleted 5y ago[deleted]