Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Conversation

@JasperDeSutter
Copy link

Associated Issue: #50

Summary of Changes

  • Ported over the WebAssembly demo code of rust-analyzer (available here: https://rust-analyzer.github.io/)
  • Extended rust IDE functionality with the help of rust-analyzer
    things like go-to definition, find usages, hover, completions, code lenses...

Note that this slows down the whole webpack build by quite a big margin. Especially fresh builds could take minutes more. Maybe another approach could be taken to include the final .wasm binary?

Test Plan

These changes have been tried manually by just trying stuff out in the hello-world rust demo.
Some parts work a bit less well than on the original rust-analyzer WASM demo because the monaco editor seems to be outdated. This could be fixed in a follow-up PR, as it might need some bigger changes throughout the codebase.

Screenshots/Videos (OPTIONAL)

example of find usages:
ra-lsp-wasm-studio

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.1%) to 89.718% when pulling 42a2ce6 on JasperDeSutter:rust-analyzer into 49afdef on wasdk:master.

@JasperDeSutter
Copy link
Author

I tried including the wasm file in the latest commit instead of the rust source code. It is available here: https://github.com/rust-analyzer/rust-analyzer.github.io/tree/master (passed through wasm-opt to reduce size to 2.7MB instead of 5+)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants