on c19bc7a help sign in
urbit.org/docs/using/layout.udon
177 lines 3.5 kB history raw
1:- :~ navhome/'/docs/'
2 navuptwo/'true'
3 next/'true'
4 sort/'4'
5 title/'Source layout'
6 ==
7;>
9# Arvo source
11When you boot an urbit, we transfer the current version of the Arvo
12operating environment to your urbit over our network. That is, the
13source for the system lives on your urbit. Here we'll take a brief tour
14through the structure of a base Arvo desk.
16Looking at the top level of
17[the Arvo repo](http://github.com/urbit/arvo), or any urbit desk that
18has been mounted to unix, we see something like:
20```
21app/
22arvo/
23gen/
24lib/
25mar/
26ren/
27sec/
28sur/
29sys/
30tests/
31web/
32web.md
33```
35Running the command `+ls %` from your urbit's Dojo produces something similar:
37```
38~your-urbit:dojo> +ls %
39LICENSE/txt app/ gen/ lib/ mar/ ren/ sec/com/ sur/ sys/ tests/ web/
40```
42Let's step through, directory by directory.
44## sys/
46This is where the Arvo kernel lives. `sys/` contains:
48##### `sys/hoon.hoon`
50[Hoon](../../tutorials/hoon-ch1) is our programming language. Since Hoon
51compiles itself, the language is actually specified in this source file.
53##### `sys/zuse.hoon`
55Zuse is the Arvo standard library.
57##### `sys/arvo/hoon`
59This is the source file for the central Arvo event dispatcher.
61##### `sys/vane`
63Vanes are sort of like kernel modules. These are worth listing one by one:
65##### `sys/vane/ames.hoon`
67Ames is our network protocol.
69##### `sys/vane/behn.hoon`
71Behn is a simple timer.
73##### `sys/vane/clay.hoon`
75Clay is our filesystem.
77##### `sys/vane/dill.hoon`
79Dill is our terminal driver.
81##### `sys/vane/eyre.hoon`
83Eyre is our webserver.
85##### `sys/vane/ford.hoon`
87Ford is our build system.
89##### `sys/vane/gall.hoon`
91Gall is our application model.
93##### `sys/vane/jael.hoon`
95Jael is our secret vault.
97##### `sys/vane/xmas.hoon`
99Xmas is the new Ames, which will go live in our next big release.
101That's it. That's the whole system.
103---
105## app/
107This is where [Gall](../../tutorials/gall) apps live. Gall apps are stateful
108servers, sort of like unix daemons. One familiar one is `app/hall.hoon` which is
109the source code for [Hall](../../tutorials/hall), the Urbit messaging transport
110layer. And there's also `app/dojo.hoon` — that's your shell.
112---
114## gen/
116`gen/` holds generators. Generators are short Dojo scripts.
118---
120## lib/
122`lib/` holds shared libraries for programs. `lib/sole` is a good
123example — that's the console library that's shared by both Dojo in the
124command line, and the Dojo web client.
126---
128## mar/
130This is where marks live. Marks are data type definitions used by Ford.
131A mark is like a mime-type, but specified in executable code.
133---
135## ren/
137These are web renderers. A renderer handles web requests of a particular
138type.
140Default web requests in urbit are handled as a `.urb`, which is caught
141by the `urb.hoon` renderer. This wraps the request in our default `CSS`
142and `JS` and adds some routing magic for certain paths.
144---
146## sec/
148Here are security drivers that Urbit uses to log into the APIs of various
149non-Urbit services.
151---
153## sur/
155`sur/` contains shared data structures. Files in `sur` are like header
156files in C.
158---
160## tests/
162`tests/` is the conventional place to put tests that use the +test generator and
163lib/test/*
165---
167## web/
169Here are files publicly accessible to the web, as made possible by
170[Eyre](../web).
172---
174## web.md
176This is the homepage for your urbit. You'll see it at
177`http://localhost:8080/` or `https://your-urbit.urbit.org/`.