-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
WASM demo #1007
Comments
I could give that a shot and let you know if I come up with anything! Super cool idea 😁 |
Recently introdced |
For syntax highlighting, see https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.itextmodel.html#deltadecorations. We should not used the approximate monarch infra for this. |
1021: Wasm dependencies r=matklad a=detrumi As a first step towards running RA on WASM (see #1007), this tweaks the dependencies somewhat so that projects built using `wasm-pack` can use `ra_ide_api` as a dependency. There were two problems: - use of undeclared type or module `MmapInner` This error occurred because of the `memmap` crate, as a dependency of `fst` Solution: specify `default-features = false` for the `fst` package (see BurntSushi/fst#70) - use of undeclared type or module `imp` This happened in the `wait-timeout` crate ([which uses `Command` under the hood](alexcrichton/wait-timeout#18)), a dependency of `rusty-fork` which is a dependency of `proptest`. Solution: move `proptest` to dev-dependencies and add `#[cfg(test)]` to the `test_utils` crate. **Edit:** Oh, that causes trouble with resolving the import when running the tests. Hmm... Co-authored-by: Wilco Kusee <[email protected]>
There's still an issue with the proptest dependency, I've opened proptest#137 and have a workaround branch here that can be used to patch |
I guess, just patching proptest in root EDIT: ... would work |
In the future we could just use https://devblogs.microsoft.com/visualstudio/intelligent-productivity-and-collaboration-from-anywhere/ |
We have wasm demo here now: https://github.com/rust-analyzer/rust-analyzer.github.io! I bet it can be greatly improved, but I don't have capacity to drive the improvements. If you have desire to tinker with WASM, feel free to hack on it how you see fit! |
It would be super cool to have a web-page which demoes rust-analyzer by running it with WASM. This could be a prototype of a WASM-powered rust-playground, which, for example, does syntax checking on the fly.
The MVP would probably be to compile ra to WASM and create a github page, with a text-area where you can edit rust code, and another text area where you see the syntax tree.
To make it really cool, we need to add Monaco editor with rust-analyzer powered syntax highlighting and simple completions support.
The text was updated successfully, but these errors were encountered: