5 ms·
To the best of my knowledge: 1. Rust is working on cross compiling support (very hard atm). 2. Rust can (pretty trivially) interface with C.
by kansface 11y ago
To the best of my knowledge:
1. Rust is working on cross compiling support (very hard atm).
2. Rust can (pretty trivially) interface with C.
- mastax 11y agoSome things I'd add: 1. Cross compiling has worked in rust since before 1.0, but it's required some manual configuration (downloading the platform's stdlib and adding command line switches, etc.). A goal for the future is push-button cross compilation [1]. I'd also add that the standard library has most of what you'd want for cross platform compatibility, from higher-level interfaces that work cross-platform (like std::thread [2]) to lower level bindings for each platform like (std::os::unix::fs [3] or the OsStr system [4]). 2. Yep, C interfaces are pretty trivial. However, they do need to be manually defined. There is no built-in way to parse C header files or declarations. [5] [1]: http://blog.rust-lang.org/2015/08/14/Next-year.html http://blog.rust-lang.org/2015/08/14/Next-year.html [2]: https://doc.rust-lang.org/nightly/std/thread/ https://doc.rust-lang.org/nightly/std/thread/ [3]: https://doc.rust-lang.org/nightly/std/os/unix/fs/ https://doc.rust-lang.org/nightly/std/os/unix/fs/ [4]: https://doc.rust-lang.org/nightly/std/ffi/struct.OsStr.html https://doc.rust-lang.org/nightly/std/ffi/struct.OsStr.html [5]: https://doc.rust-lang.org/nightly/book/ffi.html https://doc.rust-lang.org/nightly/book/ffi.html
- steveklabnik 11y agoThere is https://crates.io/crates/bindgen https://crates.io/crates/bindgen but it's not perfect.
- merb 11y agowhat editor do you guys use? or what editor has the best rust support, yet? In golang code was easily written via st2/st3
- erickt 11y agoThere's a fierce battle between the honorable Vim-ers (https://github.com/rust-lang/rust.vim https://github.com/rust-lang/rust.vim), and those scoundrel Emac-ians (https://github.com/rust-lang/rust-mode https://github.com/rust-lang/rust-mode). Work is ongoing to have better support for code completion (https://github.com/phildawes/racer https://github.com/phildawes/racer), and I heard that there has been some preliminary work to get support into Visual Studio and JetBrains, but I'm not sure how far along that is yet.
- jhasse 11y agoI'm using Atom, it work's really well with a few Rust plugins.
- Gankro 11y agoI've submitted over a hundred patches to the standard library using only st3, for reference.
- merb 11y agowhich plugins do you used?
- Gankro 11y agoGoogle Spell Check, WordCount, and Wrap Plus for docs. LLVM for IR highlighting, Rust for Rust highlighting. I've tried racer in the past but it just doesn't scale with the current compiler architecture. I'm hoping the ongoing refactoring work will get us a great incremental/parallel/continuous compilation system for autocomplete/red-squigglies. My two biggest pains are: "trivial" errors (syntax, typos, etc) which I ideally would just see as red squigglies as I go (not a compile-fail loop); and the absolute lack of any kind of incremental compilation (which paired with the community's over-use of generics is super painful for codegen time).