Project Layout (v4.0.0, 2022-07-19)
I'm a polyglot programmer. I work in a variety of languages but mostly in C#[1], Typescript[2], and Rust[3]. Every few years, I try a new language to see if I can pick up new ideas or if one “fits” my current mental state better. This is also why I've done a lot dozens of other languages; I would say I know over thirty languages but I'm only a “master” in a handful.
1: //d.moonfire.us/tags/c-sharp/
2: //d.moonfire.us/tags/typescript/
I also flit from project to project. I have my writing[4] and games. I have little one-off programs and ones that I hope will become a major thing. But, like everything else in my life, I'm “gloriously unfocused” on my tasks which means I have to minimize the speed that I get into a project before the muse escapes me.
4: //d.moonfire.us/categories/writing/
Over the years, I've come up with a project structure that works across most languages. It is mostly “for me”, but I think there are aspects of that others may enjoy.
Conventions
Throughout this document, `//` represents the root of the Git repository. So, `//src/just/build.just` would be the `build.just` in the ‘src/just’ file under the root.
When I'm referring to a directory, I will include a trailing lash such as `//src/` to make a distinct between that and `//Justfile` which is a file.
Also, I use forward slashes regardless of the operating system, PowerShell can handle both and it doesn't require escaping in most languages.
With HTML paths, I will use `//` when a link has both a Gemini and HTML server associated with it or explictly say `https://` if it is an HTML-only site.
Table of Contents
Philosophy is the general guidelines for setting up a project.
Just has the tool used to run scripts in projects.
Directories describes the preferred directory layout.
Setup for setting up a project to make it “easier” to get into it.
History describes the historical evolution of my project layout.
License
This book is distributed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license. More info can be found at https://creativecommons.org/licenses/by-nc-sa/4.0/[5]
5: https://creativecommons.org/licenses/by-nc-sa/4.0/
The preferred attribution for this novel is:
“Project Layout” by D. Moonfire is licensed under CC BY-NC-SA 4.0
In the above attribution, use the following links:
- Project Layout: https://d.moonfire.us/garden/project-layout/[6]
6: https://d.moonfire.us/garden/project-layout/
- D. Moonfire: https://d.moonfire.us/[7]
- CC BY-NC-SA 4.0: https://creativecommons.org/licenses/by-nc-sa/4.0/[8]
8: https://creativecommons.org/licenses/by-nc-sa/4.0/
Source
The source of this project can be found on the Moonfire Games forge[9]. Feel free to report any issues, requests for expansion or clarifications. Alternately, you can contact me[10] directly.
9: https://src.mfgames.com/dmoonfire-garden/project-layout
10: https://d.moonfire.us/contact/
Metadata
Categories:
Footer
Below are various useful links within this site and to related sites (not all have been converted over to Gemini).
Source