Getting Started - cyxigo/wi GitHub Wiki
This little guide will help you install Wi and print your very first "Hello, World!"
Installation
Windows or Linux, it doesn't matter – steps to install Wi are identical on both:
- Download the interpreter from the latest release
- Put it anywhere you want and add it to
PATH - Verify install by typing the following command:
wi --version
- Confirm that the command prints the installed version of Wi!
Hello World
Create a new file and name it hello.wi, then, in file, type simply:
std::puts("Hello, World!");
Run it with:
wi hello.wi
You should see:
Hello, World!
Congratulations! Wi is installed and working. So what are you waiting for? Start with learning about its syntax!
Command line
Running wi without a script starts the REPL. Available options:
| Option | Description |
|---|---|
-h, --help |
Show help |
-v, --version |
Show version information |
-pc, --print-code |
Print bytecode after compilation |
-sgc, --stress-gc |
Run garbage collection on every allocation |
-lgc, --log-gc |
Log garbage collection |
-nw, --no-warnings |
Suppress compiler warnings |
-- |
Treat all remaining arguments as script arguments |