Initial commit

This commit is contained in:
Riyyi
2026-08-25 21:43:02 +02:00
commit 715fdbb7c1
12 changed files with 106 additions and 0 deletions
Vendored
BIN
View File
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
[submodule "sindri/vendor/gram"]
path = vendor/gram
url = https://github.com/riyyi/gram.git
+29
View File
@@ -0,0 +1,29 @@
# Sindri
Game engine.
## Usage
<!-- TODO: --> TODO
## Compiling
### Dependencies
- `odin`
- `sh` a POSIX compatible shell
### Building
```sh
./build.sh
./build.sh debug
```
## Contributing
Make sure to enable git hooks:
```sh
git config core.hooksPath scripts
```
Executable
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
set -e
PROJECT="sindri"
VERSION="dev-$(date -u '+%Y-%m-%d')-$(git rev-parse --short HEAD)"
mkdir -p build
if [ "$1" = "debug" ]; then
shift
odin build src/ -show-timings -collection:src=src -out:build/$PROJECT -microarch:native -use-separate-modules -define:VERSION="$VERSION-debug" -debug "$@"
exit 0
fi
odin build src/ -show-timings -collection:src=src -out:build/$PROJECT -microarch:native -o:speed -define:VERSION="$VERSION" "$@"
Executable
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
set -e
odinfmt -w src/ > /dev/null
# odinfmt -w tests/ > /dev/null
+13
View File
@@ -0,0 +1,13 @@
{
"$schema": "https://raw.githubusercontent.com/DanielGavin/ols/master/misc/odinfmt.schema.json",
"align_struct_fields": true,
"align_struct_values": true,
"character_width": 80,
"indent_cases": true,
"newline_limit": 1,
"newline_style": "LF",
"sort_imports": true,
"space_single_line_blocks": true,
"tabs": true,
"tabs_width": 4
}
+8
View File
@@ -0,0 +1,8 @@
{
"collections": [
{
"name": "src",
"path": "src"
}
]
}
+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
SCRIPT_DIR=$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)
git stash push --keep-index --quiet
"$SCRIPT_DIR/../fmt.sh"
if ! git diff --quiet; then
echo "Formatting changed staged files; commit aborted."
git checkout -- "$SCRIPT_DIR/.."
git stash pop --quiet
exit 1
fi
# "$SCRIPT_DIR/../test.sh"
git stash pop --quiet
BIN
View File
Binary file not shown.
+11
View File
@@ -0,0 +1,11 @@
package main
import "core:fmt"
VERSION :: #config(VERSION, "dev")
// -----------------------------------------
main :: proc() {
fmt.println("hello world!")
}
BIN
View File
Binary file not shown.
Vendored Submodule
+1
Submodule vendor/gram added at 0219d56dc2