rust-lang / rust-lang/rust-analyzer

Release wasm binaries

Open
#11,244 18 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

For adding RA to the playground, it would be nice to have wasm binaries in releases in addition to linux, windows, vsix and ... so the building logic can be separated from playground and we can select between RA versions in playground, which enables using it to share code in issues and see behavior of latest RA instantly (like how playground is used in rustc and clippy).

I see three options:

  1. Do nothing. Playground can use a specific RA version, and bump it manually, occasionally (for example once a year).
  2. Declare interface in rust-analyzer-wasm repo as stable (after some changes) and build wasm binary for each release with that interface.
  3. Compile RA (after stripping unnecessary parts) as is to WASI, so LSP will become the interface. It would make the binary bigger probably, but it will enable to use it in web extension easily. Web extension should be possible with 2, but it needs a completely different code for the extension. It can also be used for targets that we don't have build officially, but they will probably prefer building from source to using 10x slower wasm.

@shepmaster is it ok to import RA wasm from third party in playground? If it isn't and we need to self host it, we can go with 1 and defer releasing wasm binaries to when another usecase appears for them.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by reviewing the release/build logic and the rust-analyzer-wasm interface discussed here, then resolve which proposed approach the project should pursue; done means the chosen WASM release approach supports the intended playground or web-extension use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
build-system, devtools, release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.