5 ms·
Rust's had great IDE support for more than a year now. - There's Atom with Tokamak, which you must also install racer and clippy via cargo to get rapid in-line
by mmstick 10y ago
Rust's had great IDE support for more than a year now.
- There's Atom with Tokamak, which you must also install racer and clippy via cargo to get rapid in-line linting.
- Then there's Visual Studio Code with RustyCode which you can also integrate with racer and clippy, that provides faster code completion and hovering over items will show a tooltip that documents that items.
- Some people like IntelliJ Rust, but I've not tried it myself.
As for installing racer and clippy, it's been made a lot easier recently via rustup:
rustup component add rust-src
rustup component add rust-docs
rustup toolchain install nightly
rustup run nightly cargo install clippy
rustup run nightly cargo install racer
Now you're good to go.
As for NumPy, there's official crates like the `num` family, which provides a plethora of useful numerics capabilities. It's not my forte though so others would know more about the best numerics crates outside of the `num` family. If you know what functionality you are looking for, it may already be created and is searchable at Crates.io.
- gravypod 10y agoI've still not been able to get Rust to work with work in IntellJ or Eclipse. I've not tried Atom but that doesn't support "Projects" or "Solutions" in the way I'd like. From what I understand there is no "go" button.
- steveklabnik 10y agoHave you tried https://intellij-rust.github.io/ https://intellij-rust.github.io/ and http://rustdt.github.io/ http://rustdt.github.io/ ? If they don't work, I'm sure their maintainers would appreciate bug reports.
- tupshin 10y agorustdt has been my daily rust environment for months. has some warts, but mostly just works
- mmstick 10y agoAtom does support Projects. The left panel is where you add your projects, which is created via cargo and has integration within Atom. You can hide the projects panel by pressing Ctrl + '\'. There's an integrated terminal if you install the tokamak terminal. I'm not sure what you mean by a 'go' button though.
- Manishearth 10y agoI don't really consider this to be "great IDE support", I consider this to be a start at IDE support. I love Rust, and I'm productive even without racer or YCM -- but I think there's a large gap between what Rust has and what many IDEs get you. Most Java/C# IDEs will get you: - Type-based autocomplete (racer/YCM/etc have this for Rust) - Jump-to-definition / documentation (YCM/etc has this) - Autoimport - Non-grep-based refactoring - Auto-boilerplating: for example, type `impl Trait for MyType` and have it tab-complete to a skeleton trait impl - Some error integration (not just fileline jump-to), with tooltips and stuff asking you how you want the IDE to auto-fix the error - A bunch of other smaller useful things which I can't remember at the moment Now, autocomplete is a major chunk of this, but nowhere near being all of it. The way I see it there are two camps on this issue. There's the "text editor" camp who use vim/emacs/sublime and when they are asking for IDE support they just mean autocomplete and jump-to that works from their editor. Then there's the camp coming from Eclipse or VS who want the whole deal. The Rust Language Server project (https://github.com/jonathandturner/rls https://github.com/jonathandturner/rls) is working on exposing this info from the compiler in a structured form so that IDEs and "text editor"s alike can get IDE features.
- EugeneOZ 10y agoIntelliJ IDEA Rust plugin gives all of that, although sometimes types detection is not smart enough.
- estefan 10y agoI've been using this plugin but it doesn't seem to do auto-import. Does it definitely support that? Apart from that, as you say, type detection isn't always particularly useful. Apart from those two features, it's pretty much there, definitely usable.
- lobster_johnson 10y agoDoes Rust have anything like "gorename" and "goimports"?
- Manishearth 10y agohttps://github.com/jonathandturner/rls https://github.com/jonathandturner/rls (still WIP) has rename support I think. Unsure if imports are in the plan.
- Animats 10y agoAgree that Rust lacks something comparable to NumPy for numeric work. Rust does have lots of numeric crates. Too many. I took a look at matrix multiply functions recently.(See [1], below "Here is what the Rust compiler actually does", for some notes on the effectiveness of Rust's subscript checking optimization.) "algebloat" wouldn't compile on stable. "matrixmultiply" is all unsafe code, with C-type raw pointers. "ndarray" has unsafe indexing. "scirust" has more raw pointer manipulation. "matrices" is an empty project. In the "num" crate, there are bigints, along with rationals and complex numbers, but no matrices. "numeric" has matrices, but it's just a wrapper for some common C libraries. (Also, calling "panic" for a singular matrix in SVD is kind of drastic.[2]) Each of these matrix crates has its own representation for multidimensional arrays. You can't mix them easily. Matrices in Rust really need some standardization. [1] https://news.ycombinator.com/item?id=13230551 https://news.ycombinator.com/item?id=13230551 [2] https://github.com/numeric-rust/numeric/blob/master/src/linalg/svd.rs https://github.com/numeric-rust/numeric/blob/master/src/lina...
- mmstick 10y agoDid you not check out `nalgebra`? https://docs.rs/nalgebra/0.10.1/nalgebra/ https://docs.rs/nalgebra/0.10.1/nalgebra/
- Animats 10y agoThat's mostly a library for small vectors for 3D graphics and such. (I once did one of those myself, for C++.[1]) There's some support for 2D matrices in "nalgebra", but with heavy use of "unsafe".[2] Every matrix package I've seen so far in Rust turns off subscript checking with unsafe code. [1] http://graphics.stanford.edu/courses/cs148-10-summer/algebra3.h http://graphics.stanford.edu/courses/cs148-10-summer/algebra... [2] https://docs.rs/crate/nalgebra/0.10.1/source/src/linalg/decompositions.rs https://docs.rs/crate/nalgebra/0.10.1/source/src/linalg/deco...
- mmstick 10y agoIs there a problem with doing that with unsafe code? You have to remember that unsafe doesn't mean unsafe in Rust. If a developer is choosing to use the unsafe keyword, it's merely telling the compiler that they know what they are doing and what they are doing is safe. One shouldn't automatically infer that unsafe code is bad or negative. It doesn't deserve the negative stigmatism that it's given.