빠른 시작

Vais Playground - Quick Start

Get the playground running in under 2 minutes!

Prerequisites

  • Node.js 18+ (download)
  • npm (comes with Node.js)
  • Modern web browser (Chrome, Firefox, Safari, Edge)

Installation

# Navigate to playground directory
cd playground

# Install dependencies (first time only)
npm install

# Start development server
npm run dev

The playground will automatically open at http://localhost:3000

Using the Playground

1. Select an Example

Click any example in the left sidebar:

  • Hello World
  • Fibonacci
  • Generics
  • And 10 more...

2. Edit Code

The Monaco editor supports:

  • Syntax highlighting
  • Auto-completion (Ctrl+Space)
  • Code folding
  • Multiple cursors

3. Run Code

Click the "Run" button or press Ctrl+Enter

4. View Output

Results appear in the right panel with:

  • Compilation status
  • Program output
  • Error messages (if any)

Quick Tips

ActionShortcut
Run codeCtrl/Cmd + Enter
Format codeCtrl/Cmd + S
Auto-completeCtrl + Space
FindCtrl/Cmd + F

Example Code

# Hello World
F main()->i64 {
    puts("Hello, Vais!")
    0
}
# Fibonacci with self-recursion
F fib(n:i64)->i64 = n<2 ? n : @(n-1) + @(n-2)
F main()->i64 = fib(10)

Next Steps

Troubleshooting

Port already in use

# Use a different port
npm run dev -- --port 3001

Dependencies not installing

# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install

Browser not opening

Manually navigate to http://localhost:3000

Building for Production

# Create optimized build
npm run build

# Preview production build
npm run preview

Output is in the dist/ directory.

Alternative: Quick Start Script

# Use the provided script
./start.sh

# Or with WASM build (requires Rust)
./start.sh --with-wasm

Support


Ready to code? Run npm run dev and start exploring Vais! ⚡