Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vlang/playground
V Playground: run, edit, share V code online
https://github.com/vlang/playground
playground v vlang
Last synced: about 2 months ago
JSON representation
V Playground: run, edit, share V code online
- Host: GitHub
- URL: https://github.com/vlang/playground
- Owner: vlang
- License: mit
- Created: 2021-06-12T23:48:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-25T17:34:35.000Z (4 months ago)
- Last Synced: 2024-11-27T12:28:34.506Z (2 months ago)
- Topics: playground, v, vlang
- Language: TypeScript
- Homepage: https://play.vlang.io
- Size: 10.3 MB
- Stars: 44
- Watchers: 5
- Forks: 12
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# V Playground: Run, Edit, Share V Code Online
The [V Playground](https://play.vlang.io/) is a place where you can run, edit and share V
code online.![](./docs/images/cover.png)
## Features
- Nice and clean UI
- Powerful editor with syntax highlighting and auto-completion
- Ability to run test code.
- Ability to see the generated C code, for the passed V code.
- Pass compilation flags to the V compiler, and separate for your program.
- Shareable code and editor state via URL or local storage.## Developing
If you wish to improve the playground, first you have to clone the repository:
```bash
git clone https://github.com/vlang/playground
cd playground
```Install V dependencies:
```bash
npm run install-server-deps
```### Run the playground locally
```bash
npm run local-serve
```
then access the playground at### Quick, containerized local development (recommended)
#### Using Docker Compose
```bash
npm run run-docker
```then access the playground at
### Using VSCode DevContainers
1. Install Docker
2. Install [Visual Studio Code](https://code.visualstudio.com/)
3. Install the
[Remote Development](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack)
extension for VS Code
4. Clone
5. Create your application within a container (see gif below)Done.
Since you are using a docker container, your main system will remain "clean".
![vscode-open-in-container](https://user-images.githubusercontent.com/17727170/197407889-88fe33b0-8e95-47fe-b2db-598fd307140e.gif)
Then just run:
```sh
npm run serve
```then access the playground at
### Run the playground locally inside isolate (as on https://play.vlang.io/)
> NOTE: Only works on Linux, since it uses `isolate`.
#### Install Dependencies
> We use isolate to sandbox the playground, so you need to install it first.
```bash
git clone https://github.com/ioi/isolate /tmp/isolate
cd /tmp/isolate
make isolate isolate-check-environment
make install
```#### Run the server
```bash
npm run serve
```... then access the playground at
## Server API
See [server/README.md](./server/README.md) for more information about the server API.
## License
This project is under the **MIT License**.
See the [LICENSE](https://github.com/vlang/playground/blob/main/LICENSE)
file for the full license text.