Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cmyr/rustplayground
Quickly test Rust code on macOS
https://github.com/cmyr/rustplayground
developer-tools macos rust
Last synced: 18 days ago
JSON representation
Quickly test Rust code on macOS
- Host: GitHub
- URL: https://github.com/cmyr/rustplayground
- Owner: cmyr
- License: apache-2.0
- Created: 2019-04-07T22:48:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-29T15:39:09.000Z (over 2 years ago)
- Last Synced: 2024-10-14T19:39:49.219Z (about 1 month ago)
- Topics: developer-tools, macos, rust
- Language: Rust
- Homepage:
- Size: 1.32 MB
- Stars: 242
- Watchers: 9
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust Playground for MacOS
***status***: experimental / pre-release / guaranteed buggy
The Rust Playground for MacOS is a standalone native mac application that allows quickly editing and testing rust snippets.
![Rust Playground Screenshot](https://raw.githubusercontent.com/cmyr/RustPlayground/screenshots/playground-0.2.png)
## installation
You can download a disk image of a recent build on [the releases page](https://github.com/cmyr/RustPlayground/releases).
### requirements
The playground [requires rustup](https://rustup.rs), and allows code to be run with any installed toolchain.
**note**: Rustup must currently be in the default directory, `$HOME/.rustup`.### install from source (requires Xcode)
- clone this repository
- cd in to the `RustPlayground` directory
- run `xcodebuild` from the command line
- copy `build/Release/Rust Playground.app` to your `Applications` directory## About
This project is based on a fork of the [xi-editor core](https://github.com/xi-editor/xi-editor). It is intended largely as an experimental offshoot of xi; a narrowly scoped editor frontend that can be used to experiment with various design decisions.
Document state is handled in rust; the swift frontend interfaces with the rust code via FFI.
### Features
- syntax highlighting
- font selection
- auto-indent
- comment toggling
- line breaking
- extern crates (with a hacky custom syntax for declaring imports)
- use any installed toolchains### Known issues
- Performance is not great; it is expected that documents are only ever a few hundred lines.
- Drawing is hacky. We may draw ghost selections.### TODO
- ~export to gist / web playground~
- export to new cargo project?
- rustfmt / clippy
- multiple documents, saving snippets?
- ASM / IR output### One day, maybe
- integrate with [cargo-instruments](https://crates.io/crates/cargo-instruments)
- benchmarking
- inline compiler warnings
- autocomplete
- RLS support
- [Rust Analyzer](https://www.github.com/rust-analyzer/rust-analyzer) support## Thanks
to the [xi-editor contributors](https://github.com/xi-editor/xi-editor/blob/master/AUTHORS), to [Jake Goulding](https://github.com/shepmaster/) for the excellent [play.rust-lang.org](https://play.rust-lang.org) implementation, and to the Rust community at large.