The V Playground is a place where you can run, edit and share V code online.
- 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.
If you wish to improve the playground, first you have to clone the repository:
git clone https://github.com/vlang/playground
cd playground
Install V dependencies:
npm run install-server-deps
npm run local-serve
then access the playground at http://localhost:5555
npm run run-docker
then access the playground at http://localhost:5555
- Install Docker
- Install Visual Studio Code
- Install the Remote Development extension for VS Code
- Clone https://github.com/vlang/playground
- Create your application within a container (see gif below)
Done.
Since you are using a docker container, your main system will remain "clean".
Then just run:
npm run serve
then access the playground at http://localhost:5555
Run the playground locally inside isolate (as on https://play.vlang.io/)
NOTE: Only works on Linux, since it uses
isolate
.
We use isolate to sandbox the playground, so you need to install it first.
git clone https://github.com/ioi/isolate /tmp/isolate
cd /tmp/isolate
make isolate isolate-check-environment
make install
npm run serve
... then access the playground at http://localhost:5555
See server/README.md for more information about the server API.
This project is under the MIT License. See the LICENSE file for the full license text.