Rust Code Completion utility

Overview

Racer - code completion for Rust

Build Status

racer completion screenshot

racer eldoc screenshot

RACER = Rust Auto-Complete-er. A utility intended to provide Rust code completion for editors and IDEs. Maybe one day the 'er' bit will be exploring + refactoring or something.

Installation

NOTE From 2.1, racer needs nightly rust

Requirements

Current nightly Rust

If you're using rustup, run

rustup toolchain add nightly

Cargo

Internally, racer calls cargo as a CLI tool, so please make sure cargo is installed

With cargo install

Simply run:

cargo +nightly install racer

As mentioned in the command output, don't forget to add the installation directory to your PATH.

From sources

  1. Clone the repository: git clone https://github.com/racer-rust/racer.git

  2. cd racer; cargo +nightly build --release. The binary will now be in ./target/release/racer

  3. Add the binary to your PATH. This can be done by moving it to a directory already in your PATH (i.e. /usr/local/bin) or by adding the ./target/release/ directory to your PATH

Configuration

  1. Fetch the Rust sourcecode

    1. automatically via rustup and run rustup component add rust-src in order to install the source to $(rustc --print sysroot)/lib/rustlib/src/rust/library (or $(rustc --print sysroot)/lib/rustlib/src/rust/src in older toolchains). Rustup will keep the sources in sync with the toolchain if you run rustup update.

    2. manually from git: https://github.com/rust-lang/rust

    Note

    If you want to use racer with multiple release channels (Rust has 3 release channels: stable, beta and nightly), you have to also download Rust source code for each release channel you install.

    e.g. (rustup case) Add a nightly toolchain build and install nightly sources too

    rustup toolchain add nightly

    rustup component add rust-src

  2. (Optional) Set RUST_SRC_PATH environment variable to point to the 'src' dir in the Rust source installation e.g. % export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/library or % export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src" (older)

    It's recommended to set RUST_SRC_PATH for speed up, but racer detects it automatically if you don't set it.

  3. Test on the command line:

    racer complete std::io::B (should show some completions)

Note

To complete names in external crates, Racer needs Cargo.lock. So, when you add a dependency in your Cargo.toml, you have to run a build command such as cargo build or cargo test, to get completions.

Editors/IDEs Supported

RLS

Racer is used as a static library in RLS

Eclipse integration

Racer can be used with Eclipse through the use of RustDT. (User guide is linked in repo description)

Emacs integration

Emacs integration has been moved to a separate project: emacs-racer.

Gedit integration

Gedit integration can be found here.

Builder integration

Gnome Builder integration can be found here

Kate integration

The Kate community maintains a plugin. It is bundled with recent releases of Kate (tested with 16.08 - read more here).

  1. Enable 'Rust code completion' in the plugin list in the Kate config dialog;

  2. On the new 'Rust code completion' dialog page, make sure 'Racer command' and 'Rust source tree location' are set correctly.

Sublime Text integration

The Sublime Text community maintains some packages that integrates Racer

  • RustAutoComplete that offers auto completion and goto definition.
  • AnacondaRUST from the anaconda plugins family that offers auto completion, goto definition and show documentation

Vim integration

Vim integration has been moved to a separate project: vim-racer.

Visual Studio Code extension

Racer recommends the official Rust (rls) extension based on RLS, which uses Racer for completion.

Atom integration

You can find the racer package for Atom here

Kakoune integration

Kakoune comes with a builtin integration for racer auto completion.

Comments
  • racer does not complete crate from cargo

    racer does not complete crate from cargo

    my env:

    mac osx ---- 10.11.5 rustc --version ---- rustc 1.10.0-nightly (476fe6eef 2016-05-21) cargo --version ---- cargo 0.11.0-nightly (259324c 2016-05-20) racer --version ---- racer 1.2.10 rustup --version ---- rustup 0.1.12 (c6e430a 2016-05-12)

    echo $CARGO_HOME
    /Users/zyanho/.cargo
    
    echo $RUST_SRC_PATH
    /Users/zyanho/code/rust/rustc-nightly/src
    
    racer complete std::time
    MATCH time,1,0,/Users/zyanho/code/rust/rustc-nightly/src/libstd/time/mod.rs,Module,/Users/zyanho/code/rust/rustc-nightly/src/libstd/time/mod.rs
    MATCH time,1,0,/Users/zyanho/code/rust/rustc-nightly/src/libstd/time/mod.rs,Module,/Users/zyanho/code/rust/rustc-nightly/src/libstd/time/mod.rs
    
    ls ~/.cargo/registry/index/github.com-1ecc6299db9ec823/ir/on/iron
    /Users/zyanho/.cargo/registry/index/github.com-1ecc6299db9ec823/ir/on/iron
    
    racer complete iron:: 
    show noting
    

    thanks for help

    opened by zyanho 56
  • Auto-completion without source code?

    Auto-completion without source code?

    It seems like it is taken for granted that source code is always availble. What if we have a proprietary dynamic library (with API documentation) but no source code, is there anyway we can use racer to gives us auto completion based on this?

    opened by johalun 22
  • Split racer into executable and library.

    Split racer into executable and library.

    I have a proof-of-concept for this set up in my fork, but it's only good enough to compile at this point and could probably use some additional refactoring and/or renaming.

    My motivation for this is to let the library contain the bulk of the logic and heavy lifting so that multiple clients can target the same functionality. The existing racer client is nice for text editors that execute it directly, but it would be nice to have support for a client that can do things like integrate with gnome-code-assistance by communicating over DBus rather than standard output and arguments to main, and I'm sure there are other use cases where this would be nice to have as well.

    enhancement 
    opened by dradtke 21
  • Use the new Thread API to sandbox libsyntax use

    Use the new Thread API to sandbox libsyntax use

    This allows RACER to continue processing even when libsyntax crashes. This is vital if we wish to use RACER as say, a library in the future.

    This fixes the issue of racer crashing

    I realize that this commit sort of undoes this one where the threading code was removed, but from what I read on the issue tracker, that code was removed since Rust's behaviour changed and allowed panic!(...) to leak between threads.

    Since the leaking of panic!(...) does not happen, I think that this error handling must be reintroduced, regardless of performance cost (yes, this does have some performance penalty)

    opened by bollu 20
  • Automatic source discovery with rust's new `rust-src` package

    Automatic source discovery with rust's new `rust-src` package

    Rust now has an "official" location to install sources to (<toolchain root>/lib/rustlib/src/rust). Although there is no separate installer for this new component, it can be installed via rustup.

    edit: scratch everything that was previously here, I'm an idiot :disappointed:

    It's as simple as racer calling rustc --print sysroot and locating the source that way. This will then seamlessly work with rustup.

    opened by Diggsey 19
  • External crate completions don't work without extern crate declaration

    External crate completions don't work without extern crate declaration

    Steps to repoduce:

    1. Create a new project: cargo new temp
    2. Add a dependency, e.g. rand = "0.6.5"
    3. cargo build
    4. Try to complete use rand:: (I tested it with vim). It won't work.
    5. Add extern crate rand; and try again. It will.

    Versions:

    racer v2.1.19
    rustc 1.34.0-nightly (146aa60f3 2019-02-18)
    Linux
    
    opened by eatsfoobars 17
  • rust-racer failed to install: (error el-get: cargo el-get could not build rust-racer [cargo build --release])

    rust-racer failed to install: (error el-get: cargo el-get could not build rust-racer [cargo build --release])

    • Arch linux

    • rustc 1.26.2 (594fb253c 2018-06-01)

    • cargo 1.26.0 (0e7c5a931 2018-04-06)

    • stable channel

    • emacs package manager: el-get

       Compiling cfg-if v0.1.2
       Compiling nodrop v0.1.12
       Compiling memoffset v0.2.1
       Compiling scopeguard v0.3.3
       Compiling lazy_static v1.0.0
       Compiling libc v0.2.39
       Compiling rustc-rayon-core v0.1.0
       Compiling pkg-config v0.3.11
       Compiling cc v1.0.15
       Compiling smallvec v0.6.1
       Compiling stable_deref_trait v1.0.0
       Compiling unicode-xid v0.0.4
       Compiling bitflags v1.0.1
       Compiling byteorder v1.2.3
       Compiling void v1.0.2
       Compiling matches v0.1.6
       Compiling quote v0.3.15
       Compiling either v1.5.0
       Compiling unicode-xid v0.1.0
       Compiling regex v0.2.10
       Compiling serde v1.0.62
       Compiling unicode-normalization v0.1.7
       Compiling ucd-util v0.1.1
       Compiling rustc-ap-serialize v151.0.0
       Compiling foreign-types-shared v0.1.1
    error[E0554]: #![feature] may not be used on the stable release channel
      --> /home/crandel/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-151.0.0/lib.rs:23:1
       |
    23 | #![feature(rustc_private, box_syntax)]
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    error[E0554]: #![feature] may not be used on the stable release channel
      --> /home/crandel/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-151.0.0/lib.rs:24:1
       |
    24 | #![feature(core_intrinsics)]
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    error[E0554]: #![feature] may not be used on the stable release channel
      --> /home/crandel/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-151.0.0/lib.rs:25:1
       |
    25 | #![feature(specialization)]
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    error: aborting due to 3 previous errors
    
    For more information about this error, try `rustc --explain E0554`.
    error: Could not compile `rustc-ap-serialize`.
    warning: build failed, waiting for other jobs to finish...
    error: build failed
    
    
    support 
    opened by Crandel 17
  • Build Failing with Cargo Nightly

    Build Failing with Cargo Nightly

    I am getting the following error when running cargo +nightly install racer:

       Compiling rustc-ap-rustc_data_structures v686.0.0
    error[E0107]: wrong number of type arguments: expected 2, found 1
       --> /Users/tobi/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-686.0.0/src/graph/iterate/mod.rs:256:10
        |
    256 |     ) -> ControlFlow<Self::BreakVal> {
        |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 type arguments
    
    error[E0107]: wrong number of type arguments: expected 2, found 1
       --> /Users/tobi/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-686.0.0/src/graph/iterate/mod.rs:261:51
        |
    261 |     fn node_settled(&mut self, _node: G::Node) -> ControlFlow<Self::BreakVal> {
        |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 type arguments
    
    error[E0107]: wrong number of type arguments: expected 2, found 1
       --> /Users/tobi/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-686.0.0/src/graph/iterate/mod.rs:284:10
        |
    284 |     ) -> ControlFlow<Self::BreakVal> {
        |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 type arguments
    
    error: aborting due to 3 previous errors
    
    For more information about this error, try `rustc --explain E0107`.
    error: could not compile `rustc-ap-rustc_data_structures`
    
    To learn more, run the command again with --verbose.
    warning: build failed, waiting for other jobs to finish...
    error: failed to compile `racer v2.1.40`, intermediate artifacts can be found at `/var/folders/sw/jmc9rg0n17v550p30c7_wqmr0000gp/T/cargo-install8jfGll`
    
    Caused by:
      build failed
    

    MacOs:

    rustup 1.22.1 (b01adbbc3 2020-07-08)
    rustc 1.49.0-nightly (ffa2e7ae8 2020-10-24)
    cargo 1.49.0-nightly (dd83ae55c 2020-10-20)
    

    Thanks

    opened by SFzxc 16
  • Read substitute file from stdin

    Read substitute file from stdin

    Hello!

    Not all editors use temp-files (or don't expose them to plugin authors). I made it possible for the substitute file to be read from stdin if you specify "-" as the substitute_file.

    Is this functionality something you would be interested in merging? In that case i will continue to work on it. There are a few things that still needs doing.

    • Check/fix for daemon mode
    • Make testable and add tests

    If you are curious, I am working on a plugin for Visual Studio Code.

    The plugin is located at https://github.com/henriiik/vscode-rust.

    opened by henriiik 16
  • Provide a completer to YCM

    Provide a completer to YCM

    Great work on racer! This will be super useful once it is more dynamic.

    https://github.com/Valloric/YouCompleteMe is a code completion plugin for Vim that is very sophisticated. It provides IDE like completion for C++ but integrates with other completers too. I use it for python, c++ and java and love it in all languages.

    YCM has solved the UI problem in Vim completely, racer should be a completer for it in Vim, not a stand alone plugin.

    enhancement 
    opened by SirVer 16
  • replace cargo.rs with cargo

    replace cargo.rs with cargo

    Current racer's file search has many problems. Sometimes it fails to find dependency(see comments in #551), and it causes too much recursion(#831). To resolve these problems, I replaced cargo.rs with cargo crate. For clients which does sync io, this change can cause 2~3s delay when downloading dependencies, but other than that, it works well.

    To work with cargo, current tests implementation have some problems.

    • Currently we use env::set_current_dir for test_project, but it doesn't work with cargo.
    • It uses our own TmpDir implementation, which creates directory under racer/. So if a test panics it leaves tempdir in our normal file system. It's a bit annoying.

    So I implemented new with_test_project function which copies whole files into tempdir and then run tests in that directory. And I replace racer's TmpDir with tempfile crate and remove sync! macro in each tests. Each test directories have unique names so there's no need to lock threads. Now tests are much faster.

    In addition, I want to leave some notes about dependency caching. Here we have cached dependencies for each manifest files(i.e. Cargo.toml), because racer calls get_crate_file many times in a session. Compared to @birkenfeld's way in #838, it has 2 differences.

    1. It doesn't have caches of crate roots. It call's cargo::util::important_paths::find_root_manifest_for_wd everytime. This is because I think it can't be bottleneck.

    2. It has dependency cache in Session, not in thread_local global variable. It can cause decrease in speed for clients using racer as library like rls. This is because I think to use thread_local make difficult to provide stateful APIs in the future, but I have no strong opinion about this.

    And here's a result of benchmark, though it's not so general(We need more practical bench, but it will be a future task). Before

    test benches::bench_code_chunks     ... bench:      86,014 ns/iter (+/- 5,202)
    test benches::bench_iter_stmts      ... bench:     206,687 ns/iter (+/- 35,788)
    test benches::bench_mask_comments   ... bench:      30,087 ns/iter (+/- 4,644)
    test benches::bench_mask_sub_scopes ... bench:     127,966 ns/iter (+/- 23,547)
    

    After

    test benches::bench_code_chunks     ... bench:      87,280 ns/iter (+/- 5,913)
    test benches::bench_iter_stmts      ... bench:     222,251 ns/iter (+/- 22,692)
    test benches::bench_mask_comments   ... bench:      30,376 ns/iter (+/- 3,099)
    test benches::bench_mask_sub_scopes ... bench:     127,343 ns/iter (+/- 14,004)
    
    opened by kngwyu 15
  • cargo +nightly build racer Error

    cargo +nightly build racer Error

    Help,build failed in mac.

    ➜  racer git:(master) cargo -V
    cargo 1.62.0-nightly (1ef1e0a12 2022-03-31)
    
    ➜  racer git:(master) rustup show
    Default host: x86_64-apple-darwin
    rustup home:  /Users/feiyu/.rustup
    
    installed toolchains
    --------------------
    
    stable-x86_64-apple-darwin (default)
    nightly-2022-04-06-x86_64-apple-darwin
    nightly-x86_64-apple-darwin
    
    active toolchain
    ----------------
    
    nightly-2022-04-06-x86_64-apple-darwin (overridden by '/Users/feiyu/go/src/github.com/racer-rust/racer/rust-toolchain.toml')
    rustc 1.62.0-nightly (306ba8357 2022-04-05)
    
    ➜  racer git:(master) cargo +nightly build --release
       Compiling racer-interner v0.1.0 
       Compiling racer-cargo-metadata v0.1.2
       Compiling racer v2.2.2 
    error[E0432]: unresolved import `rustc_ast::ast::BindingMode`
      --> src/racer/ast_types.rs:21:26
       |
    21 | pub use rustc_ast::ast::{BindingMode, Mutability};
       |                          ^^^^^^^^^^^ no `BindingMode` in `ast`
    
    error[E0407]: method `fluent_bundle` is not a member of trait `Emitter`
      --> src/racer/ast.rs:33:5
       |
    33 | /     fn fluent_bundle(&self) -> Option<&Lrc<rustc_errors::FluentBundle>> {
    34 | |         None
    35 | |     }
       | |_____^ not a member of trait `Emitter`
    
    error[E0407]: method `fallback_fluent_bundle` is not a member of trait `Emitter`
      --> src/racer/ast.rs:36:5
       |
    36 | /     fn fallback_fluent_bundle(&self) -> &Lrc<rustc_errors::FluentBundle> {
    37 | |         unimplemented!("diagnostic translations are unimplemented in racer");
    38 | |     }
       | |_____^ not a member of trait `Emitter`
    
    error[E0412]: cannot find type `Lit` in module `ast`
       --> src/racer/ast_types.rs:153:39
        |
    153 |     pub(crate) fn from_lit(lit: &ast::Lit) -> Option<Ty> {
        |                                       ^^^ not found in `ast`
        |
    help: consider importing this struct
        |
    2   | use rustc_ast::token::Lit;
        |
    help: if you import `Lit`, refer to it directly
        |
    153 -     pub(crate) fn from_lit(lit: &ast::Lit) -> Option<Ty> {
    153 +     pub(crate) fn from_lit(lit: &Lit) -> Option<Ty> {
        |
    
    error[E0532]: expected tuple struct or tuple variant, found unit variant `LitKind::Err`
       --> src/racer/ast_types.rs:168:13
        |
    168 |             LitKind::Err(_) => None,
        |             ^^^^^^^^^^^^^^^
       --> /rustc/c6fcdb690609769a240fc8ab0de0ce68d5ea7dba/compiler/rustc_ast/src/ast.rs:1816:5
        |
        = note: `LitKind::Err` defined here
        |
    help: use this syntax instead
        |
    168 |             LitKind::Err => None,
        |             ~~~~~~~~~~~~
    help: consider importing one of these items instead
        |
    2   | use core::result::Result::Err;
        |
    2   | use std::result::Result::Err;
        |
    help: if you import `Err`, refer to it directly
        |
    168 -             LitKind::Err(_) => None,
    168 +             Err(_) => None,
        |
    
    error[E0277]: the trait bound `DummyEmitter: Translate` is not satisfied
      --> src/racer/ast.rs:25:6
       |
    25 | impl Emitter for DummyEmitter {
       |      ^^^^^^^ the trait `Translate` is not implemented for `DummyEmitter`
       |
       = help: the following other types implement trait `Translate`:
                 AnnotateSnippetEmitterWriter
                 EmitterWriter
                 JsonEmitter
                 SilentEmitter
    note: required by a bound in `Emitter`
      --> /rustc/c6fcdb690609769a240fc8ab0de0ce68d5ea7dba/compiler/rustc_errors/src/emitter.rs:204:1
    
    Some errors have detailed explanations: E0277, E0407, E0412, E0432, E0532.
    For more information about an error, try `rustc --explain E0277`.
    error: could not compile `racer` due to 6 previous errors
    warning: build failed, waiting for other jobs to finish...
    
    opened by gosoon 0
  • cargo +nightly install racer Error

    cargo +nightly install racer Error

    I have tried to install racer but I keep getting this error. I couldn't find it anywhere else.

    Info

    $ rustup show Default host: x86_64-unknown-linux-gnu rustup home: /home/thomas28/.rustup

    installed toolchains

    stable-x86_64-unknown-linux-gnu (default) nightly-x86_64-unknown-linux-gnu

    active toolchain

    stable-x86_64-unknown-linux-gnu (default) rustc 1.60.0 (7737e0b5c 2022-04-04)

    $rustup update info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu' info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu' info: checking for self-updates

    stable-x86_64-unknown-linux-gnu unchanged - rustc 1.60.0 (7737e0b5c 2022-04-04) nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.62.0-nightly (f4ec0e7cf 2022-04-22)

    info: cleaning up downloads & tmp directories

    Fail

    $cargo +nightly install racer Updating crates.io index Installing racer v2.2.2 Compiling proc-macro2 v1.0.37 Compiling unicode-xid v0.2.2 Compiling syn v1.0.91 Compiling serde_derive v1.0.136 Compiling serde v1.0.136 Compiling memchr v2.4.1 Compiling libc v0.2.124 Compiling serde_json v1.0.79 Compiling log v0.4.16 Compiling cfg-if v1.0.0 Compiling itoa v1.0.1 Compiling unicode-width v0.1.9 Compiling ryu v1.0.9 Compiling quick-error v1.2.3 Compiling regex-syntax v0.6.25 Compiling termcolor v1.1.3 Compiling vec_map v0.8.2 Compiling convert_case v0.4.0 Compiling strsim v0.8.0 Compiling ansi_term v0.12.1 Compiling bitflags v1.3.2 Compiling lazy_static v1.4.0 Compiling humantime v2.1.0 Compiling lazycell v1.3.0 Compiling textwrap v0.11.0 Compiling humantime v1.3.0 Compiling quote v1.0.18 Compiling aho-corasick v0.7.18 Compiling atty v0.2.14 Compiling regex v1.5.5 Compiling clap v2.34.0 Compiling env_logger v0.7.1 Compiling derive_more v0.99.17 Compiling racer-interner v0.1.0 Compiling rls-span v0.5.4 Compiling racer-cargo-metadata v0.1.2 Compiling racer v2.2.2 error[E0053]: method fallback_fluent_bundle has an incompatible type for trait --> /home/thomas28/.cargo/registry/src/github.com-1ecc6299db9ec823/racer-2.2.2/src/racer/ast.rs:36:41 | 36 | fn fallback_fluent_bundle(&self) -> &Lrc<rustc_errors::FluentBundle> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | expected struct fluent_bundle::bundle::FluentBundle, found struct Lrc | help: change the output type to match the trait: &fluent_bundle::bundle::FluentBundle<fluent_bundle::resource::FluentResource, intl_memoizer::IntlLangMemoizer> | = note: expected fn pointer fn(&DummyEmitter) -> &fluent_bundle::bundle::FluentBundle<fluent_bundle::resource::FluentResource, intl_memoizer::IntlLangMemoizer> found fn pointer fn(&DummyEmitter) -> &Lrc<fluent_bundle::bundle::FluentBundle<fluent_bundle::resource::FluentResource, intl_memoizer::IntlLangMemoizer>>

    error[E0023]: this pattern has 5 fields, but the corresponding tuple variant has 6 fields --> /home/thomas28/.cargo/registry/src/github.com-1ecc6299db9ec823/racer-2.2.2/src/racer/ast.rs:232:31 | 232 | visit::FnKind::Fn(_, _, ref fn_sig, _, ) => &*fn_sig.decl, | ^ ^ ^^^^^^^^^^ ^ ^ expected 6 fields, found 5 | help: use _ to explicitly ignore each field | 232 | visit::FnKind::Fn(, _, ref fn_sig, _, _, _) => &*fn_sig.decl, | +++

    error[E0023]: this pattern has 5 fields, but the corresponding tuple variant has 6 fields --> /home/thomas28/.cargo/registry/src/github.com-1ecc6299db9ec823/racer-2.2.2/src/racer/ast.rs:1261:31 | 1261 | visit::FnKind::Fn(_, _, ref fn_sig, _, ) => &*fn_sig.decl, | ^ ^ ^^^^^^^^^^ ^ ^ expected 6 fields, found 5 | help: use _ to explicitly ignore each field | 1261 | visit::FnKind::Fn(, _, ref fn_sig, _, _, _) => &*fn_sig.decl, | +++

    Some errors have detailed explanations: E0023, E0053. For more information about an error, try rustc --explain E0023. error: could not compile racer due to 3 previous errors warning: build failed, waiting for other jobs to finish... error: failed to compile racer v2.2.2, intermediate artifacts can be found at /tmp/cargo-installODCwvH

    opened by Thomas28M 2
  • racer does not work on `doom-emacs` after installation of all the packages

    racer does not work on `doom-emacs` after installation of all the packages

    Hey folks, I'm have install rust and rustup dev components alongside racer. I'm trying to use doom-emacs but I got this error and no code completion. Screen Shot 2022-04-02 at 02 59 03

    I don't know what should have done since I have installed the cargo, cargo +nightly, rustup and all the dev dependencies of the rust on my device. I should also mention that I've got M1 CPU on my machine, is the problem the CPU?

    opened by emadbaqeri 7
  • Failed to build using latest nightly

    Failed to build using latest nightly

    $ cargo +nightly install racer 
        Updating crates.io index
      Installing racer v2.1.48
       Compiling libc v0.2.109
       ...
       Compiling rustc-ap-rustc_data_structures v722.0.0
       Compiling rustc-ap-rustc_arena v722.0.0
       Compiling rustc-ap-rustc_span v722.0.0
    error[E0635]: unknown feature `thread_local_const_init`
      --> /home/sys2/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-722.0.0/src/lib.rs:23:12
       |
    23 | #![feature(thread_local_const_init)]
       |            ^^^^^^^^^^^^^^^^^^^^^^^
    
    For more information about this error, try `rustc --explain E0635`.
    error: could not compile `rustc-ap-rustc_span` due to previous error
    warning: build failed, waiting for other jobs to finish...
    error: failed to compile `racer v2.1.48`, intermediate artifacts can be found at `/tmp/cargo-installf8feJG`
    
    Caused by:
      build failed
    
    $ rustup run nightly rustc --version
    rustc 1.59.0-nightly (0b6f079e4 2021-12-07)
    

    It's an upstream issue: https://github.com/rust-lang/rust/issues/91543

    opened by t-e-r-m 5
  • Does not find symbols in external implementations

    Does not find symbols in external implementations

    In

    pub mod lib {
        pub struct Foo;
    
        impl Foo {
    	pub fn some_func() {}
        }
    }
    
    pub mod app {
        impl crate::lib::Foo {
    	pub fn other_func() {}
        }
    }
    
    fn main() {
        lib::Foo::some_func();	// ok
        lib::Foo::other_func();	// broken
    }
    

    the some_func() symbol is found by racer while other_func not:

    $ racer --version
    racer 2.1.45
    
    $ racer complete 16 15 main.rs 
    PREFIX 182,183,s
    MATCH some_func,5,8,main.rs,Function,pub fn some_func()
    END
    
    $ racer complete 17 15 main.rs 
    PREFIX 215,216,o
    END
    
    opened by ensc 0
Releases(v2.1.36)
Owner
null
A small utility to compare Rust micro-benchmarks.

cargo benchcmp A small utility for comparing micro-benchmarks produced by cargo bench. The utility takes as input two sets of micro-benchmarks (one "o

Andrew Gallant 304 Dec 27, 2022
🧑🏻‍⚕️ Command-line utility which poll on remote addresses in order to perform status checks periodically

ナース (Nāsu) ????‍⚕️ Command-line utility which poll on remote addresses in order to perform status checks periodically Motivation Nāsu (from Japanese ナ

Esteban Borai 13 Nov 14, 2021
A simple utility for multithreading a/synchronization

Flowync Quick Example use flowync::Flower; fn main() { let flower = Flower::<i32, String>::new(1); std::thread::spawn({ let handle =

Adia Robbie 12 Dec 5, 2022
Format Rust code

rustfmt Quick start On the Stable toolchain On the Nightly toolchain Installing from source Usage Running cargo fmt Running rustfmt directly Verifying

The Rust Programming Language 4.8k Jan 7, 2023
compile rust code into memes

cargo-memex Besides their size, rust binaries have a significant disadvantage: rust binaries are not memes yet. cargo-memex is a cargo subcommand that

Matthias Seitz 243 Dec 11, 2022
Create evolving artistic images with hot-code-reloaded Lisp and GLSL.

Shadergarden is a tool for building hot-code-reloadable shader pipelines. For a tutorial for how to get started, consult the introductory

Tonari, Inc 101 Dec 29, 2022
Detects usage of unsafe Rust in a Rust crate and its dependencies.

cargo-geiger ☢️ A program that lists statistics related to the usage of unsafe Rust code in a Rust crate and all its dependencies. This cargo plugin w

Rust Secure Code Working Group 1.1k Dec 26, 2022
Powerful database anonymizer with flexible rules. Written in Rust.

[Data]nymizer Powerful database anonymizer with flexible rules. Written in Rust. Datanymizer is created & supported by Evrone. What else we develop wi

[Data]nymizer 381 Dec 26, 2022
⚡️Lightning-fast linter for .env files. Written in Rust 🦀

⚡️ Lightning-fast linter for .env files. Written in Rust ?? Dotenv-linter can check / fix / compare .env files for problems that may cause the applica

null 1.5k Jan 9, 2023
The Rust toolchain installer

rustup: the Rust toolchain installer Master CI Build Status Windows macOS Linux Etc rustup installs The Rust Programming Language from the official re

The Rust Programming Language 5.1k Jan 8, 2023
Repository for the Rust Language Server (aka RLS)

Rust Language Server (RLS) The RLS provides a server that runs in the background, providing IDEs, editors, and other tools with information about Rust

The Rust Programming Language 3.6k Jan 7, 2023
🦀 The ultimate search extension for Rust

Rust Search Extension 简体中文 The ultimate search extension for Rust Search docs, crates, builtin attributes, official books, and error codes, etc in you

Huhu 962 Dec 30, 2022
a freeform Rust build system

tinyrick: a freeform Rust build system .---. ^ o{__ω__ o{ ^0^ -Let me out! ~~ ( // *|* \xx\) xx`|' = =

Andrew 48 Dec 16, 2022
The Curly programming language (now in Rust!)

Curly Curly is a functional programming language that focuses on iterators. Some of its main implementation features include sum types, iterators, lis

Curly Language 30 Jan 6, 2023
Some WIP payload in Rust running on M1.

m1saka Some WIP payload in Rust running on M1. Project informations The aim of this payload is to provide exploration capabilities while providing a s

Mary 10 Mar 7, 2021
A library to compile USDT probes into a Rust library

sonde sonde is a library to compile USDT probes into a Rust library, and to generate a friendly Rust idiomatic API around it. Userland Statically Defi

Wasmer 39 Oct 12, 2022
A neofetch alike program that shows hardware and distro information written in rust.

nyafetch A neofetch alike program that shows hardware and distro information written in rust. installing install $ make install # by default, install

null 16 Dec 15, 2022
Automated license checking for rust. cargo lichking is a Cargo subcommand that checks licensing information for dependencies.

cargo-lichking Automated license checking for rust. cargo lichking is a Cargo subcommand that checks licensing information for dependencies. Liches ar

Nemo157 120 Dec 19, 2022
Create target folder as a RAMdisk for faster Rust compilation.

cargo-ramdisk This crate is only supported for unix like systems! cargo-ramdisk creates a ramdisk at the target folder of your project for ridiculousl

PauMAVA 20 Jan 8, 2023