Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grafov/rust-playground
GNU/Emacs mode that setup local playground for code snippets in Rust language.
https://github.com/grafov/rust-playground
emacs emacs-mode melpa playground repl rust rust-language rust-playground
Last synced: 3 months ago
JSON representation
GNU/Emacs mode that setup local playground for code snippets in Rust language.
- Host: GitHub
- URL: https://github.com/grafov/rust-playground
- Owner: grafov
- License: gpl-3.0
- Created: 2016-12-19T22:52:14.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-11-23T07:33:26.000Z (about 3 years ago)
- Last Synced: 2024-09-29T22:41:50.618Z (4 months ago)
- Topics: emacs, emacs-mode, melpa, playground, repl, rust, rust-language, rust-playground
- Language: Emacs Lisp
- Homepage:
- Size: 232 KB
- Stars: 45
- Watchers: 3
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rust-playground [![MELPA Stable](https://stable.melpa.org/packages/rust-playground-badge.svg)](https://stable.melpa.org/#/rust-playground) [![MELPA](https://melpa.org/packages/rust-playground-badge.svg)](https://melpa.org/#/rust-playground)
GNU/Emacs mode that setup local playground for code snippets in Rust language. This is a port of
[go-playground](https://github.com/grafov/go-playground) adapted for Rust environment.## Install
Install `rust-playground` from MELPA:
M-x package-install RET rust-playground
The mirror repository of the project: https://notabug.org/grafov/rust-playground.
I really not think that this small project need the mirror but I just would like advertise a nice
git hosting for FOSS. Try [notabug.org](https://notabug.org) for your projects! :)Example screen after creation of a new snippet:
![screenshot](rust-playground-after-start.png)
## Usage
### Quick start
1. From any mode run `M-x rust-playground` for start a new playground buffer filled with basic
template for the package with main function (see the picture below).
1. Add your code then press `Ctl-Return` (it bound to `rust-playground-exec` command). It will save,
compile and exec the snippet code.
1. When you played enough with this snippet just run `M-x rust-playground-rm`. It will remove the
current snippet with its directory and all files.### List of interactive functions
| Function name | Description |
|---|---|
| `rust-playground` | Create a new playground buffer with basic template for the package. |
| `rust-playground-download` | [WIP] Download the snippet from the URL at play.rust-lang.org. |
| `rust-playground-exec` | Save, compile and run the code of the snippet. |
| `rust-playground-upload` | [WIP] Upload the buffer to play.golang.org and return the short URL. |
| `rust-playground-rm` | Remove the snippet with its directory with all files. |## Project status
The plugin is usable. I've stopped learning Rust yet so this Emacs plugin not very interesting for
me. But I'll continue to maintain it and backport features from `go-playground`. Patches are
welcomed!