Skip to content

Commit d4c0abe

Browse files
committed
Add docs about available functions.
1 parent eaab718 commit d4c0abe

File tree

1 file changed

+44
-2
lines changed

1 file changed

+44
-2
lines changed

README.md

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,50 @@
1+
<!--*- mode:markdown;mode:orgtbl;fill-column:99 -*-->
12
# rust-playground [WIP]
23

34
GNU/Emacs mode that setup local playground for code snippets in Rust
4-
language. This is a fast and dirty port of
5+
language. This is a port of
56
[go-playground](https://github.com/grafov/go-playground) adapted for
67
Rust environment.
78

8-
*Work in progress.*
9+
## Install
10+
11+
Install `rust-playground` from MELPA:
12+
13+
M-x package-install RET rust-playground
14+
15+
The mirror repository of the project: https://notabug.org/grafov/rust-playground.
16+
I really not think that this small project need the mirror but I just would like advertise a nice
17+
git hosting for FOSS. Try [notabug.org](https://notabug.org) for your projects! :)
18+
19+
## Usage
20+
21+
### Quick start
22+
23+
1. From any mode run `M-x rust-playground` for start a new playground buffer filled with basic
24+
template for the package with main function (see the picture below).
25+
1. Add your code then press `Ctl-Return` (it bound to `rust-playground-exec` command). It will save,
26+
compile and exec the snippet code.
27+
1. When you played enough with this snippet just run `M-x rust-playground-rm`. It will remove the
28+
current snippet with its directory and all files.
29+
30+
### List of interactive functions
31+
32+
<!---
33+
#+ORGTBL: SEND keys orgtbl-to-gfm
34+
| Function name | Description |
35+
|----------------------------+----------------------------------------------------------------------|
36+
| `rust-playground` | Create a new playground buffer with basic template for the package. |
37+
| `rust-playground-download` | [WIP] Download the snippet from the URL at play.rust-lang.org. |
38+
| `rust-playground-exec` | Save, compile and run the code of the snippet. |
39+
| `rust-playground-upload` | [WIP] Upload the buffer to play.golang.org and return the short URL. |
40+
| `rust-playground-rm` | Remove the snippet with its directory with all files. |
41+
-->
42+
<!--- BEGIN RECEIVE ORGTBL keys -->
43+
| Function name | Description |
44+
|---|---|
45+
| `rust-playground` | Create a new playground buffer with basic template for the package. |
46+
| `rust-playground-download` | [WIP] Download the snippet from the URL at play.rust-lang.org. |
47+
| `rust-playground-exec` | Save, compile and run the code of the snippet. |
48+
| `rust-playground-upload` | [WIP] Upload the buffer to play.golang.org and return the short URL. |
49+
| `rust-playground-rm` | Remove the snippet with its directory with all files. |
50+
<!--- END RECEIVE ORGTBL keys -->

0 commit comments

Comments
 (0)