Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Latest commit

 

History

History
64 lines (44 loc) · 1.26 KB

newproject.md

File metadata and controls

64 lines (44 loc) · 1.26 KB

Generating a new project

Let’s write a small application with our new Vein development environment. To start, we’ll use rune to make a new project for us. In your terminal of choice run:

rune new

This will generate a new directory with the following files:

name-of-your-project
|- name-of-your-project.vproj
|- src
  |- main.vein

name-of-your-project.vproj is the project file for Vein. It’s where you keep metadata for your project, as well as dependencies.
src/main.vein is where we’ll write our application code.

Adding dependencies

Let’s add a dependency to our application.
You can find all sorts of libraries on gallery, the package registry for Vein.
In Vein, we often refer to packages as “shard”

In this project, we’ll use a shard called cow.
In our *.vproj file we’ll add this information (that we got from the gallery page):

packages:
- [email protected]

We can also do this by running

rune add cow

Now we can run:

rune build

Fast start

cd ~/
mkdir cool_project
cd cool_project
rune new
rune run
code .