Project Structure
This guide will show you how a Doks project is organized and what the different files in your project do.
A Xiroth project is usually made up of 2 parts, the backend (Zig Project) and the frontend (HTML, CSS, [Java/Type]Script), and the setup looks something like this:
.
├── build.zig
├── build.zig.zon
├── src_xiroth
│ ├── index.html
│ ├── script.js
│ └── style.css
├── README.md
├── src
│ ├── binder.zig
│ └── main.zig
└── xiroth.zonIn this case, the backend and frontend projects are at the top level, where everything is the backend and the frontend is the src_xiroth/ folder. This Zig project is just a normal project with some extra files:
xiroth.zon: Xiroth’s configuration file. It contains everything from the configuration of setting your Window’s height and width to the development command that executes before building your Xiroth application.src/main.zig: The main entry point for your Xiroth application. It’s where you can write your application’s backend logic to be used by the frontend.src/binder.zig: A library used by Xiroth to bundle assets in the application itself. This file shouldn’t be touched and should be Git ignored.