on 8883702 help sign in
urbit.org/using/layout.md
172 lines 3.4 kB history raw
1+++
2title = "Source layout"
3weight = 5
4template = "doc.html"
5+++
6When you boot an urbit, we transfer the current version of the Arvo
7operating environment to your urbit over our network. That is, the
8source for the system lives on your urbit. Here we'll take a brief tour
9through the structure of a base Arvo desk.
11Looking at the top level of
12[the Arvo repo](http://github.com/urbit/arvo), or any urbit desk that
13has been mounted to unix, we see something like:
15```
16app/
17arvo/
18gen/
19lib/
20mar/
21ren/
22sec/
23sur/
24sys/
25tests/
26web/
27web.md
28```
30Running the command `+ls %` from your urbit's Dojo produces something similar:
32```
33~your-urbit:dojo> +ls %
34LICENSE/txt app/ gen/ lib/ mar/ ren/ sec/com/ sur/ sys/ tests/ web/
35```
37Let's step through, directory by directory.
39## sys/
41This is where the Arvo kernel lives. `sys/` contains:
43##### `sys/hoon.hoon`
45[Hoon](/docs/learn/arvo/hoon) is our programming language. Since Hoon
46compiles itself, the language is actually specified in this source file.
48##### `sys/zuse.hoon`
50Zuse is the Arvo standard library.
52##### `sys/arvo/hoon`
54This is the source file for the central Arvo event dispatcher.
56##### `sys/vane`
58Vanes are sort of like kernel modules. These are worth listing one by one:
60##### `sys/vane/ames.hoon`
62Ames is our network protocol.
64##### `sys/vane/behn.hoon`
66Behn is a simple timer.
68##### `sys/vane/clay.hoon`
70Clay is our filesystem.
72##### `sys/vane/dill.hoon`
74Dill is our terminal driver.
76##### `sys/vane/eyre.hoon`
78Eyre is our webserver.
80##### `sys/vane/ford.hoon`
82Ford is our build system.
84##### `sys/vane/gall.hoon`
86Gall is our application model.
88##### `sys/vane/jael.hoon`
90Jael is our secret vault.
92##### `sys/vane/xmas.hoon`
94Xmas is the new Ames, which will go live in our next big release.
96That's it. That's the whole system.
98---
100## app/
102This is where [Gall](../gall) apps live. Gall apps are stateful
103servers, sort of like unix daemons. One familiar one is `app/hall.hoon` which is
104the source code for [Hall](../hall), the Urbit messaging transport
105layer. And there's also `app/dojo.hoon` — that's your shell.
107---
109## gen/
111`gen/` holds generators. Generators are short Dojo scripts.
113---
115## lib/
117`lib/` holds shared libraries for programs. `lib/sole` is a good
118example — that's the console library that's shared by both Dojo in the
119command line, and the Dojo web client.
121---
123## mar/
125This is where marks live. Marks are data type definitions used by Ford.
126A mark is like a mime-type, but specified in executable code.
128---
130## ren/
132These are web renderers. A renderer handles web requests of a particular
133type.
135Default web requests in urbit are handled as a `.urb`, which is caught
136by the `urb.hoon` renderer. This wraps the request in our default `CSS`
137and `JS` and adds some routing magic for certain paths.
139---
141## sec/
143Here are security drivers that Urbit uses to log into the APIs of various
144non-Urbit services.
146---
148## sur/
150`sur/` contains shared data structures. Files in `sur` are like header
151files in C.
153---
155## tests/
157`tests/` is the conventional place to put tests that use the +test generator and
158lib/test/*
160---
162## web/
164Here are files publicly accessible to the web, as made possible by
165[Eyre](../eyre).
167---
169## web.md
171This is the homepage for your urbit. You'll see it at
172`http://localhost:8080/` or `https://your-urbit.urbit.org/`.