Odin’s Arsenal: The Weapons of the Allfather

About Odin Arsenal

Odin was known for his insatiable thirst for knowledge, his strategic prowess and, most of all, his legendary weapons. Odin’s legacy lives on in the tales of his mythical arsenal and his multifaceted persona as a seeker of wisdom, a warrior, and a ruler.

This is a project of tools made for Odin developers. They will range from simple templates to sophisticated systems and applications. Contributing to Odin ecosystem and help Odin developers feel happy, wholesome and powerful.

Arsenal

The available tools are the following:

:sewing_needle: Gungnir: Odin’s Spear of Power

It is said that Gungnir never missed its mark and always returned to Odin’s hand, no matter how far he threw it. In the same spirit, this project never misses a Markdown style comment and generates Markdown files to document *.odin files.

:ring: Draupnir: Odin’s Magical Ring of Abundance

Every ninth night, Draupnir would produce eight new rings of the same size and weight, adding to Odin’s wealth and power. In the same spirit, this project adds to Odin’s wealth and power by scaffolding Odin projects with a series of thoughtful file and directory structures.

5 Likes

Props for encorporating nord mythology into naming of the projects, that’s kinda cool. The documentation generator looks interesting, haven’t look at it much though. Draupnir on the other hand is something I wouldn’t want to use. A simpler project structure usually suffices in the beginning and you can grow it as you grow your project, there’s no reason to do it all right at the start where over half of those things you might not even need.

README’s seem lacking for both projects. Maybe putting more details about what it does exactly would help unsuspecting readers about what they’re gonna get from using it would help.

2 Likes

Yes they are early versions. Draupnir structure have two versions one “full” with all the bells and whistles and other “minimal” with just two important structures: lib and project.odin. That will be the minimum structure required by Gungnir to create a project based documentation, althought it will support only one file or only one package directory if you dont want to follow Draupnir’s structure.

Ok I improved the Readme a little more. Thanks for the feedback.

Why use Draupnir Templates?

These templates have in common the project.odin file and the lib directory. These are the core structures that a Draupnir template requires. Following this convention, many tools can have a common standard and help the community understand quicker and better Odin codebases. For example the Gungnir tool can assume the codebase contains at minimum a project.odin file and a lib directory and start searching for files to document inside the lib directory. This convention simplifies many decisions and make tools more thoughtful and friendly.

Where this convention comes from?

This convention takes inspiration and ideas from battle tested projects found in other languages and tools such as:

project.odin

This file is used for commands or other project related procedures. By default is an alias of lib/lib.odin main procedure. But can be modified as a special build, different from lib.odin. Is used mainly to identify the directory as an odin project. However can be used as the main file of the project instead of lib.odin.

lib/

A directory that holds your application source code. It’s required by the Draupnir template convention.

lib/lib.odin

This file is were the main procedure code is stored or just be a library of procedures, enums, types, constants for the project.odin file to use. It’s optional to be named lib.odin since the only requirement is the lib directory.

Full Template

This project template have all the bells and whistles of a complete project: Readmes, Changelogs, dependency directory, docs, private directores, and other directories and files. Normally used in complex applications and command line apps.

When to Use?

Use this template if you want a complete project from the start. It provides a good and strong structure for big applications to grow. It includes the run script that enables the -collection:project=. param, and can build debug and release versions of both project.odin and lib.

Minimal Template

This project template have only the minimum directories and files needed for Gungnir (lib and project.odin), so it can generate documentation. Also contains common files such as: .gitignore, .editorconfig and a sample README.md and test directory.

When to Use?

Use this template if you want a lean starting point with just a lib and project.odin directories.
Ideal for experiments, simple applications or want to tailor the structure at will. It includes the run script that enables the -collection:project=. param, and can build debug and release versions of both project.odin and lib.

Blank Template

This project template only contains: lib/, project.odin, .gitignore and README.md.

It’s the most lean possible template compatible with Gungnir. Besides the lib and project.odin directories

is up to you to set the contents and structure of the project.

I decided to archive this project. Maybe I resume it when I become more profecient with Odin.