Rust Racer Autocomplete
Posted: Mon Nov 16, 2015 2:54 am
The latest Zeus release adds support for the Rust programming language.
The latest version can be found here: http://zeusedit.com/z300/ze32v398f.zip
The latest version adds compiler support as well as autocomplete, code navigation and tooltips.
Rust Installation and Setup
To compile Rust code inside Zeus the Rust compiler must be installed and the Rust bin folder must be defined in the system PATH environment variable.
For the autocomplete, code navigation and tooltips to work the Racer tool needs to have been installed and also located in the PATH.
The tool Racer can be found here: https://github.com/phildawes/racer
For the Racer tool to work it also needs the RUST_SRC_PATH environment variable defined and pointing to the root folder of the Rust source code.
Depending on which version of Rust you install, you may also need to configure the environment for the linker.
If you are running the Visual Studio version and get this error, it means the Visual Studio environment has not been correctly configured:
Code Complete
Consider this example code (where the '|' represent the cursor):
Using the Macros tab found on the Navigator panel and running the Racer - Autocomplete macro will result in this popup display:
That auto complete would also automatically fire in this situation, after typing in the ':' character:
Code Navigation
Consider this example code where the cursor is located on the Broadcast word:
Using the Macros tab and running the Racer - Goto Definition macro will result in this the loading of the rust\src\libstd\io\mod.rs file at a locate containing the piece of code:
Rust Tooltips
Consider this example code where the cursor is located on the _print word:
Using the Macros tab and running the Racer - Display Tooltip macro will result in the tooltip popup display shown below:
The latest version can be found here: http://zeusedit.com/z300/ze32v398f.zip
The latest version adds compiler support as well as autocomplete, code navigation and tooltips.
Rust Installation and Setup
To compile Rust code inside Zeus the Rust compiler must be installed and the Rust bin folder must be defined in the system PATH environment variable.
For the autocomplete, code navigation and tooltips to work the Racer tool needs to have been installed and also located in the PATH.
The tool Racer can be found here: https://github.com/phildawes/racer
For the Racer tool to work it also needs the RUST_SRC_PATH environment variable defined and pointing to the root folder of the Rust source code.
Depending on which version of Rust you install, you may also need to configure the environment for the linker.
If you are running the Visual Studio version and get this error, it means the Visual Studio environment has not been correctly configured:
Code: Select all
error: could not exec the linker `link.exe`: The system cannot find the file specified. (os error 2)
Consider this example code (where the '|' represent the cursor):
Code: Select all
use std;
fn main() {
std::io::B|
}
Code: Select all
fn main() {
std::io::|
}
Consider this example code where the cursor is located on the Broadcast word:
Code: Select all
use std;
fn main() {
std::io::Broadcast
}
Code: Select all
/// A `Write` adaptor which will write data to multiple locations.
///
/// This struct is generally created by calling [`broadcast()`][broadcast] on a
/// writer. Please see the documentation of `broadcast()` for more details.
///
/// [broadcast]: trait.Write.html#method.broadcast
#[unstable(feature = "io", reason = "awaiting stability of Write::broadcast",
issue = "27802")]
pub struct Broadcast<T, U> {
first: T,
second: U,
}
Consider this example code where the cursor is located on the _print word:
Code: Select all
use std::*;
fn main() {
std::io::_print(
}