Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rust-analyzer proc-macro server project #24

Merged
merged 2 commits into from
Feb 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ We use the GSoC project size parameters for estimating the expected time complex
- [Prototype Cargo plumbing commands](#prototype-cargo-plumbing-commands)
- [Move cargo shell completions to Rust](#move-cargo-shell-completions-to-Rust)
- [Build script delegation](#build-script-delegation)
- **rust-analyzer**
- [Implement a new proc-macro server RPC API](#implement-a-new-proc-macro-server-RPC-API)
- **Crate ecosystem**
- [Modernize the libc crate](#Modernize-the-libc-crate)
- [Add more lints to `cargo-semver-checks`](#add-more-lints-to-cargo-semver-checks)
Expand Down Expand Up @@ -611,6 +613,45 @@ Medium.
- [Idea discussion](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Idea.3A.20Build.20script.20delegation)
- Ed Page ([GitHub](https://github.com/epage), [Zulip](https://rust-lang.zulipchat.com/#narrow/dm/424212-Ed-Page))

## rust-analyzer

### Implement a new proc-macro server RPC API

**Description**

Today, rust-analyzer (and RustRover) expands proc-macros by spawning a separate proc-macro server
process that loads and executes the proc-macro dynamic libraries. They communicate to this process
via a JSON RPC interface that has not been given much thought when it was implemented, now starting
to show its limitations.

The goal is to replace this current implementation entirely in favor of a more performant format
that also supports the more complicated needs of the proc-macro API, outlined in
https://github.com/rust-lang/rust-analyzer/issues/19205.

**Expected result**

There exists a new proc-macro server that is more efficient and allows for implementing the
remaining proc-macro API. Ideally, it should be integrated within rust-analyzer.

**Desirable skills**

Intermediate knowledge of Rust.

**Project size**

Medium.

**Difficulty**

Medium.

**Mentor**
- Lukas Wirth ([GitHub](https://github.com/veykril), [Zulip](https://rust-lang.zulipchat.com/#narrow/dm/300586-Lukas-Wirth))

**Zulip streams**
- [Idea discussion](https://rust-lang.zulipchat.com/#narrow/channel/185405-t-compiler.2Frust-analyzer/topic/proc-macro.20server.20IPC.20format)
- [rust-analyzer team](https://rust-lang.zulipchat.com/#narrow/channel/185405-t-compiler.2Frust-analyzer)

## Crate ecosystem

### Modernize the libc crate
Expand Down