Compare commits

...

No commits in common. "1.0.0-alpha" and "main" have entirely different histories.

5 changed files with 64 additions and 37 deletions

View file

@ -14,28 +14,32 @@ steps:
- name: build-linux-x86_64
image: *zig_image
commands:
- zig build -Dtarget=x86_64-linux-musl -Doptimize=ReleaseSafe --prefix zig-out-linux-x86_64
# - zig build -Dtarget=x86_64-linux-musl -Doptimize=ReleaseSafe --prefix zig-out-linux-x86_64
- zig build -Dtarget=x86_64-linux-musl --prefix zig-out-linux-x86_64
- cp zig-out-linux-x86_64/bin/htmlua htmlua-linux-x86_64
- cp zig-out-linux-x86_64/bin/htmlua-cgi htmlua-cgi-linux-x86_64
- name: build-linux-aarch64
image: *zig_image
commands:
- zig build -Dtarget=aarch64-linux-musl -Doptimize=ReleaseSafe --prefix zig-out-linux-aarch64
# - zig build -Dtarget=aarch64-linux-musl -Doptimize=ReleaseSafe --prefix zig-out-linux-aarch64
- zig build -Dtarget=aarch64-linux-musl --prefix zig-out-linux-aarch64
- cp zig-out-linux-aarch64/bin/htmlua htmlua-linux-aarch64
- cp zig-out-linux-aarch64/bin/htmlua-cgi htmlua-cgi-linux-aarch64
- name: build-macos-x86_64
image: *zig_image
commands:
- zig build -Dtarget=x86_64-macos -Doptimize=ReleaseSafe --prefix zig-out-macos-x86_64 --sysroot /opt/MacOSX11.3.sdk
# - zig build -Dtarget=x86_64-macos -Doptimize=ReleaseSafe --prefix zig-out-macos-x86_64 --sysroot /opt/MacOSX11.3.sdk
- zig build -Dtarget=x86_64-macos --prefix zig-out-macos-x86_64 --sysroot /opt/MacOSX11.3.sdk
- cp zig-out-macos-x86_64/bin/htmlua htmlua-macos-x86_64
- cp zig-out-macos-x86_64/bin/htmlua-cgi htmlua-cgi-macos-x86_64
- name: build-macos-aarch64
image: *zig_image
commands:
- zig build -Dtarget=aarch64-macos -Doptimize=ReleaseSafe --prefix zig-out-macos-aarch64 --sysroot /opt/MacOSX11.3.sdk
# - zig build -Dtarget=aarch64-macos -Doptimize=ReleaseSafe --prefix zig-out-macos-aarch64 --sysroot /opt/MacOSX11.3.sdk
- zig build -Dtarget=aarch64-macos --prefix zig-out-macos-aarch64 --sysroot /opt/MacOSX11.3.sdk
- cp zig-out-macos-aarch64/bin/htmlua htmlua-macos-aarch64
- cp zig-out-macos-aarch64/bin/htmlua-cgi htmlua-cgi-macos-aarch64

23
.crow/release.yml Normal file
View file

@ -0,0 +1,23 @@
# This file is a bit of a hack in order to run the real release CI
when:
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
clone:
git:
image: codefloe.com/crow-plugins/clone:1.1.0
settings:
tags: true
steps:
- name: retag-latest
image: alpine:3.20
environment:
FORGEJO_TOKEN:
from_secret: forgejo_token
commands:
- apk add --no-cache git
- git remote set-url origin "https://oauth2:$${FORGEJO_TOKEN}@$${CI_FORGE_URL#https://}/$${CI_REPO}.git"
- git tag -f latest
- git push -f origin latest

19
LICENSE Normal file
View file

@ -0,0 +1,19 @@
Copyright 2026 Grace Yoder
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

9
README.md Normal file
View file

@ -0,0 +1,9 @@
# HTMLua
### An HTML templating engine with (not yet reimplemented) Lua scripting abilities
See in action at [grace.pink](https://grace.pink/index.htmlua)
This is currently an incomplete rewrite. If you want to have the old rust
version you are able to checkout the `rust` tag.

View file

@ -1,36 +1,8 @@
.{
// This is the default name used by packages depending on this one. For
// example, when a user runs `zig fetch --save <url>`, this field is used
// as the key in the `dependencies` table. Although the user can choose a
// different name, most users will stick with this provided value.
//
// It is redundant to include "zig" in this name because it is already
// within the Zig package namespace.
.name = .htmlua,
// This is a [Semantic Version](https://semver.org/).
// In a future version of Zig it will be used for package deduplication.
.version = "0.0.0",
// Together with name, this represents a globally unique package
// identifier. This field is generated by the Zig toolchain when the
// package is first created, and then *never changes*. This allows
// unambiguous detection of one package being an updated version of
// another.
//
// When forking a Zig project, this id should be regenerated (delete the
// field and run `zig build`) if the upstream project is still maintained.
// Otherwise, the fork is *hostile*, attempting to take control over the
// original project's identity. Thus it is recommended to leave the comment
// on the following line intact, so that it shows up in code reviews that
// modify the field.
.fingerprint = 0xb94bab7ca04adb0c, // Changing this has security and trust implications.
// Tracks the earliest Zig version that the package considers to be a
// supported use case.
.version = "1.0.0-alpha",
.fingerprint = 0xb94bab7ca04adb0c,
.minimum_zig_version = "0.16.0",
// This field is optional.
// Each dependency must either provide a `url` and `hash`, or a `path`.
// `zig build --fetch` can be used to fetch all dependencies of a package, recursively.
// Once all dependencies are fetched, `zig build` no longer requires
// internet connectivity.
.dependencies = .{
.tree_sitter = .{
.url = "git+https://github.com/tree-sitter/zig-tree-sitter.git#b562510b5563dcf3b7fcac4a5fe9d60834c84667",
@ -45,8 +17,8 @@
"build.zig",
"build.zig.zon",
"src",
// For example...
//"LICENSE",
//"README.md",
"examples",
"LICENSE",
"README.md",
},
}