Rust Explorer playground now supports CLI, Vim, rustfmt, clippy, and macro-expand

www.rustexplorer.com

Now you can run code on Rust Explorer without login.

I've been working on this update in the last three weeks. The front-end now uses SvelteKit, previously React Router Dom.

The editor now uses CodeMirror and supports Vim mode. Monaco gives a lot out of the box but limited customization. I moved the editor to CodeMirror to prepare for the next big update. You probably can guess it.

CLI

Now you can play with clap and run multiple commands without retyping them everytime you want to test them.

/*
$ play --help
$ play 'https://www.google.com'
$ play 'https://new.ycombinator.com'
-d {
    "title": "Rust Explorer",
    "link": "https://www.rustexplorer.com"
}
$ echo 'Hello CLI' > message.txt
$ cat message.txt
*/

Visit help to learn more.


Let me know what you think of the new design, especially the user page.

5 Likes

I get a SyntaxError exception when visiting the website. It seems to be due to this (from minified source code):

    const n = (localStorage == null ? void 0 : localStorage.getItem('settings')) || '',
    e = JSON.parse(n);

When visiting site for the first time, settings is not in localStorage, and empty string is not valid JSON which prevents loading the website.

1 Like

Thanks for the bug report. I've fixed it.

It's not Rust. If it were Rust, I should've been forced to handle this silly error. Maybe I should rewrite the front-end with Yew.

1 Like