4 ms·
I heard the Rust API changes between versions such that it’s a bit of a pain upgrading systems. Is this true? Also, I’ve read traits can be used as invariants
by exdsq 6y ago
I heard the Rust API changes between versions such that it’s a bit of a pain upgrading systems. Is this true?
Also, I’ve read traits can be used as invariants for a pseudo-dependent type system. Has anyone had experience with this?
I’m considering learning it instead of C++ for some systems work.
- jfkebwjsbx 6y agoIf your systems work do not require stable compilers or rely too much on external C++ APIs, then you will be mostly fine.
- exdsq 6y agoIt’s mostly to trace process performance, network load, stuff like that.
- jasondclinton 6y ago> I heard the Rust API changes between versions such that it’s a bit of a pain upgrading systems. Is this true? No, this isn't true. https://blog.rust-lang.org/2018/07/27/what-is-rust-2018.html#what-is-rust-2018 https://blog.rust-lang.org/2018/07/27/what-is-rust-2018.html... was the last change and it was optional and automated migration.
- dagmx 6y agoFor your first point, you might be thinking of ABI and not API? Rust doesn’t have a stable ABI but the API is non breaking as long as you aren’t on nightly AND opting into unstable features. If you stay on stable Rust, you’ll not really have breaking changes between versions. Regarding ABI , that means that if you compile rust into a library with one version, you can’t reuse that compiled library in a newer version of the compiler, unless you go through a stable ABI like exposing a C interface. However if you recompile your code, it’ll work. You need to keep them compiled by the same compiler version.