Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions doc/tvpl/c2-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If you are on Ubuntu or a derivative,

will install what you need. If you're on *Arch Linux*,

sudo pacman -S dmd llvm nasm git
sudo pacman -S dmd llvm nasm git clang gdc

will do it. Otherwise consult your OS documentation on how to install these packages.

Expand Down Expand Up @@ -67,6 +67,8 @@ Finally, [download and install git.](https://git-scm.com/download/win) Make sure

Download [Battery](https://github.com/VoltLang/Battery/releases), Volt's build tool. Make sure it's on your `PATH`.

If you're on *Arch Linux* you can install [battery from the AUR](https://aur.archlinux.org/packages/battery/) with an [AUR helper](https://wiki.archlinux.org/index.php/AUR_helpers).

### Getting The code

Now that the dependencies have been installed, let's set up a place to build *Volta* and the tools it needs. For simplicity, this tutorial will assume this location is directly in your `$HOME` directory/User folder, but you can place it where you want.
Expand Down Expand Up @@ -116,7 +118,7 @@ Then, so long as the `LLVM-C.DLL` that you built is in your `PATH` somewhere, yo

Create a new folder, `hello`. In this folder would go all the code and tests that make up the project. All we want to do is print a message to the screen.

Save this code into a file called `main.volt`, and put that in a `src` folder inside the `hello` folder.
Inside of `hello`, create a new `src` folder, this is where your code will go. Save the code under into a file called `main.volt` inside the `src` folder.

import watt.io;

Expand All @@ -126,10 +128,17 @@ Save this code into a file called `main.volt`, and put that in a `src` folder in
return 0;
}

Then save the following in the root of the folder in a file called `battery.txt`.
Then save the following in the root of the folder in a file called `battery.toml`.

name = "hello"
dependencies = ["watt"]

Your folder structure should now look like this:

--dep
watt
hello/
├── src/
│ └── main.volt
└── battery.toml

For more information on Battery, check out [its documentation](https://github.com/VoltLang/Battery/blob/master/doc/index.md).

Expand Down