rust-lang / rust-lang/rust-mode
no library targets found in package `current_project`
Nobody has claimed this yet.
- Dominant language
- Emacs Lisp
- Stars
- 1.3k
- Forks
- 198
- PR merge metrics
- No merged PRs in 30d
Description
I am very new to emacs and are trying to set it up for rust development.
When I am in a *.rs file and M-x rust-mode this error pops up:
Suspicious state from syntax checker rust-cargo: Flycheck checker rust-cargo returned 101, but its output contained no errors: error: no library targets found in package `learn_async`
Try installing a more recent version of rust-cargo, and please open a bug report if the issue persists in the latest release. Thanks!
I updated cargo rust with:
rustup update
and updated all my packages with paradox.
Emacs: Doom
OS: Fedora
config.el:
[...]
(after! rustic
(setq lsp-rust-server 'rust-analyzer))
(use-package lsp-mode
:ensure
:commands lsp
:custom
;; what to use when checking on-save. "check" is default, I prefer clippy
(lsp-rust-analyzer-cargo-watch-command "clippy")
(lsp-eldoc-render-all t)
(lsp-idle-delay 0.6)
;; enable / disable the hints as you prefer:
(lsp-rust-analyzer-server-display-inlay-hints t)
(lsp-rust-analyzer-display-lifetime-elision-hints-enable "skip_trivial")
(lsp-rust-analyzer-display-chaining-hints t)
(lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names nil)
(lsp-rust-analyzer-display-closure-return-type-hints t)
(lsp-rust-analyzer-display-parameter-hints nil)
(lsp-rust-analyzer-display-reborrow-hints nil)
:config
(add-hook 'lsp-mode-hook 'lsp-ui-mode))
(use-package lsp-ui
:ensure
:commands lsp-ui-mode
:custom
(lsp-ui-peek-always-show t)
(lsp-ui-sideline-show-hover t)
(lsp-ui-doc-enable nil))
(rustic and lsp mode both don't work either but I am starting with rust-mode, because it told me to open a new issue)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the rust-cargo checker error from M-x rust-mode using the reported Rust project setup and configuration, then compare the checker behavior with a package that has no library target. Inspect how rust-mode invokes rust-cargo and determine whether the binary-only package is handled correctly or requires clearer guidance; done means the reported setup no longer produces a misleading checker failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- emacs, rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100