Setup Windows builds
Some checks failed
/ verify (push) Has been cancelled

This commit is contained in:
Juno Takano 2026-06-20 01:11:45 -03:00
commit 8b1b855296
6 changed files with 88 additions and 31 deletions

View file

@ -27,10 +27,11 @@ jobs:
- name: Setup Rust toolchain
run: |
rustup component add llvm-tools-preview
rustup component add llvm-tools
rustup component add --toolchain nightly rustfmt clippy
rustup target add x86_64-unknown-linux-gnu
rustup target add x86_64-unknown-linux-musl
rustup target add x86_64-pc-windows-msvc
- name: Setup additional tooling
run: .forgejo/workflows/setup-tools.sh
@ -43,16 +44,30 @@ jobs:
- name: Run all assessments
run: just ci verify
- name: Build x64 glibc release binary
run: just release-build x86_64-unknown-linux-gnu
- name: Build x64 Linux glibc release binary
run: just release-build-gnu
- name: Build x64 musl release binary
run: just release-build x86_64-unknown-linux-musl
- name: Build x64 Linux musl release binary
run: just release-build-musl
- name: Build x64 Windows MSVC release binary
run: just release-build-msvc
- name: Calculate SHA-256 hashes
run: just shasum
- name: Publish x64 glibc binary to git.jutty.dev registry
- name: Publish x64 Linux musl binary to git.jutty.dev registry
if: ${{ inputs.upload }}
run: |
version=$(./target/x86_64-unknown-linux-musl/release/en --version)
api_root=https://git.jutty.dev/api
url=$api_root/packages/jutty/generic/en/$version/en-x64-linux-musl
curl -fsSL \
--user jutty:${{ secrets.GJD_REGISTRY_TOKEN }} \
--upload-file target/x86_64-unknown-linux-musl/release/en $url
- name: Publish x64 Linux glibc binary to git.jutty.dev registry
if: ${{ inputs.upload }}
run: |
version=$(./target/x86_64-unknown-linux-gnu/release/en --version)
@ -63,13 +78,13 @@ jobs:
--user jutty:${{ secrets.GJD_REGISTRY_TOKEN }} \
--upload-file target/x86_64-unknown-linux-gnu/release/en $url
- name: Publish x64 musl binary to git.jutty.dev registry
- name: Publish x64 Windows MSVC binary to git.jutty.dev registry
if: ${{ inputs.upload }}
run: |
version=$(./target/x86_64-unknown-linux-musl/release/en --version)
api_root=https://git.jutty.dev/api
url=$api_root/packages/jutty/generic/en/$version/en-x64-linux-musl
url=$api_root/packages/jutty/generic/en/$version/en-x64-windows-msvc
curl -fsSL \
--user jutty:${{ secrets.GJD_REGISTRY_TOKEN }} \
--upload-file target/x86_64-unknown-linux-musl/release/en $url
--upload-file target/x86_64-pc-windows-msvc/release/en.exe $url

View file

@ -15,6 +15,8 @@ TYPOS_VERSION="1.47.2"
TYPOS_SHA256SUM="7aef58932fc123b4cf4b40d86468e89a3297d80169051d7cfd13a235e05fc426"
CARGO_DENY_VERSION="0.19.8"
CARGO_DENY_SHA256SUM="70e769ae3872e34d45132b17040859175e11401dc12dddb0303e0b8c7d088f3f"
CARGO_XWIN_VERSION="0.23.0"
CARGO_XWIN_SHA256SUM="74a216f64f10ea81c909f02d6b1a84cd0fda8de4c87ee52fe63ba76ab2392b75"
TRIPLE="x86_64-unknown-linux-gnu"
TRIPLE_MUSL="x86_64-unknown-linux-musl"
@ -73,3 +75,7 @@ fetch crate-ci/typos "v$TYPOS_VERSION" \
fetch EmbarkStudios/cargo-deny "$CARGO_DENY_VERSION" \
cargo-deny-$CARGO_DENY_VERSION-$TRIPLE_MUSL.tar.gz \
"$CARGO_DENY_SHA256SUM" cargo-deny
fetch rust-cross/cargo-xwin "v$CARGO_XWIN_VERSION" \
cargo-xwin-v$CARGO_XWIN_VERSION.$TRIPLE_MUSL.tar.gz \
"$CARGO_XWIN_SHA256SUM" cargo-xwin

View file

@ -27,7 +27,7 @@ jobs:
- name: Setup Rust toolchain
run: |
rustup component add llvm-tools-preview
rustup component add llvm-tools
rustup component add --toolchain nightly rustfmt clippy
rustup target add x86_64-unknown-linux-gnu
rustup target add x86_64-unknown-linux-musl

View file

@ -301,13 +301,26 @@ alias c := check
# Run tests
[group: 'assess']
test pattern="":
cargo test {{ pattern}} --timings -- --test-threads=1 'serial_tests::'
cargo test {{ pattern}} --timings --bin en
cargo test {{ pattern}} --timings --doc
cargo test {{ pattern}} --timings --lib -- --skip 'serial_tests::'
cargo test {{ pattern }} --timings -- --test-threads=1 'serial_tests::'
cargo test {{ pattern }} --timings --bin en
cargo test {{ pattern }} --timings --doc
cargo test {{ pattern }} --timings --lib -- --skip 'serial_tests::'
{{ if which("wine") == "" {
"echo Skipping Windows tests: wine not found"
} else {
just_cmd + " test-windows"
} }}
alias t := test
# Run Windows tests using wine
[group: 'assess']
test-windows pattern="":
-{{ xwin_test(pattern) }} --timings -- --test-threads=1 'serial_tests::'
-{{ xwin_test(pattern) }} --timings --bin en
-{{ xwin_test(pattern) }} --timings --doc
-{{ xwin_test(pattern) }} --timings --lib -- --skip 'serial_tests::'
# Run tests with unfiltered output
[group: 'assess']
test-output pattern="":
@ -431,8 +444,9 @@ alias bm := build-musl
# Release build
[group: 'build']
release-build target=default_target:
cargo build --timings --target {{ target }} --locked --release
du -h target/{{ target }}/release/en
{{ maybe_xwin(target) }} build \
--timings --target {{ target }} --locked --release
du -h target/{{ target }}/release/{{ with_suffix("en", target) }}
alias rb := release-build
@ -450,6 +464,13 @@ release-build-musl:
alias rbm := release-build-musl
# MSVC release build
[group: 'build']
release-build-msvc:
{{ just_cmd }} release-build {{ msvc_target }}
alias rbw := release-build-msvc
# Calculate SHA 256 hashes for release binaries
[group: 'build']
shasum:
@ -458,7 +479,6 @@ shasum:
| xargs sha256sum
## META
[default, private]
default:
@just --list --unsorted --justfile {{justfile()}}
@ -473,11 +493,11 @@ ci recipe:
su ci -c "just {{ recipe }}"
## VARIABLES
export CARGO_TERM_COLOR := 'always'
musl_target := "x86_64-unknown-linux-musl"
glibc_target := "x86_64-unknown-linux-gnu"
msvc_target := "x86_64-pc-windows-msvc"
default_target := musl_target
debug_vars := 'DEBUG=${DEBUG:-} DEBUG_FILTER=${DEBUG_FILTER:-} RUST_BACKTRACE=${RUST_BACKTRACE:-} RUSTFLAGS=${RUSTFLAGS:-}'
@ -493,7 +513,11 @@ lockfile_version := ```
| grep version | cut -d '"' -f 2
```
## OPTIONS
## FUNCTIONS
with_suffix(file, target) := if target == msvc_target { f"{{ file }}.exe" } else { file }
maybe_xwin(target) := if target == msvc_target { "cargo-xwin" } else { "cargo" }
xwin_test(pattern) := f"cargo-xwin test {{ pattern }} --target {{ msvc_target }}"
## OPTIONS
set unstable
set lazy

4
Cargo.lock generated
View file

@ -123,9 +123,9 @@ checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593"
[[package]]
name = "cc"
version = "1.2.64"
version = "1.2.65"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dad887fd958be91b5098c0248def011f4523ab786cd411be668777e55063501f"
checksum = "e228eec9be7c17ccb640b59b36a5cd805ea2a564a4c5e162c2f659fea30d3b96"
dependencies = [
"find-msvc-tools",
"shlex",

View file

@ -4,11 +4,18 @@ root_node = "Introduction"
[nodes.Introduction]
text = """
<small>
_Eager to jump right in? Head straight to |GetStarted|_.
</small>
## What is en?
en is a writing tool. It was designed for complex, conceptually heavy projects, where the relationships between terms matter and possibly have their own attributes. You can use it to write non-linear, connected textual works and have their references to which other mapped out as a |graph| of metadata-rich, interrelated information. This very website is running en.
en is a writing tool. It was designed for complex, conceptually heavy projects, where the relationships between terms matter and possibly have their own attributes. This very website is running en. You can use it to write non-linear, connected textual works and have their references to which other mapped out as a |graph| of metadata-rich, interrelated information.
It works by ingesting plain text files written in |TOML|, a file format that focuses on being human-readable but that can also be directly interpreted by computer programs. These files contain your node definitions and allow en to construct a human-readable website that makes your graphs' nodes browsable, searchable and listed in relation to each other or as a shallow tree of nodes. It also serves this graph as raw data for integration with other tools that can further analyze and transform what you have written.
It works by ingesting plain text files written in |TOML|, a file format that focuses on being human-readable but that can also be directly interpreted by computer programs. en also features its own |markup language|Syntax that was designed to be readable and as unobstructive as possible to the flow of writing.
These files contain your node definitions and allow en to construct a human-readable website that makes your graphs' nodes browsable, searchable and listed in relation to each other or as a shallow |tree of nodes|/tree|. It also serves this graph as |raw data|/data for integration with other tools that can further analyze and transform what you have written.
## Motivation
@ -20,16 +27,16 @@ Because your en graph is defined in simple plain-text files, you can add new pag
## What's ahead
en is in its infancy. Right now, most of the work is focused on making the markup syntax more robust. Some interesting features planned include:
en is in its infancy. Right now, most of the work is focused on making the markup language more robust. Some interesting planned features include:
- Multi-file graphs, including single-file node definitions with TOML frontmatter
- Multi-file graphs, including single-node `.en` files with TOML frontmatter
- Richer node connection metadata, with builtin connection kinds and special rendering styles
- More node metrics, sorting options and full-text search
- New render formats: static website, single page and PDF/EPUB formats with paper-friendly metadata
- JSON schema for language server integration
- Separating the server from the source-to-source translator, allowing en's markup syntax to be used as a standalone compile-to-HTML language
- Adding CLI options to make it more practical to manipulate a graph, such as adding new nodes or querying your graphagarn
- Adding CLI options to make it more practical to manipulate a graph, such as adding new nodes or querying your graph
- Hypergraphs, enabling cross-graph references and letting the user choose which graph to render
- Other rendering formats, such as static websites, single page HTML and PDF/EPUB with paper-friendly metadata
If you like what you see and are curious about en's future, take a look at the |roadmap| for a more comprehensive view of what else is to come.
@ -50,13 +57,16 @@ The easiest way to get started is by downloading a pre-built binary.
x64 Linux binaries are available from the |git.jutty.dev package registry|https://git.jutty.dev/jutty/-/packages/generic/en|:
%
Platform ! Download
x64 Linux GNU | |en-x64-linux-gnu|https://git.jutty.dev/api/packages/jutty/generic/en/{{ en_version }}/en-x64-linux-gnu|
x64 Linux musl | |en-x64-linux-musl|https://git.jutty.dev/api/packages/jutty/generic/en/{{ en_version }}/en-x64-linux-musl |
Platform ! Download
x64 Linux GNU | |en-x64-linux-gnu|https://git.jutty.dev/api/packages/jutty/generic/en/{{ en_version }}/en-x64-linux-gnu|
x64 Linux musl | |en-x64-linux-musl|https://git.jutty.dev/api/packages/jutty/generic/en/{{ en_version }}/en-x64-linux-musl |
x64 Windows MSVC | |en-x64-windows-msvc|https://git.jutty.dev/api/packages/jutty/generic/en/{{ en_version }}/en-x64-windows-msvc |
%
If in doubt, it is likely your system uses the GNU libc. Regardless, the musl binary is statically compiled and should run on mostly any x64 Linux system.
Windows builds are best-effort|https://en.wikipedia.org/wiki/Best-effort_delivery|, cross-compiled, mostly tested only through Wine and not tested on CI.
Other platforms may be supported in the future depending on CI resources.
### Build from source
@ -1072,8 +1082,10 @@ These changes are planned, but have not been assigned to an upcoming release yet
- [ ] Finalize JSON schema
- [ ] Add CI step with `taplo lint`
### Code
### Internals
- [ ] Assess `Option` return types that should be `Result`
- [ ] Replace CI tooling setup script with a nix shell
### Performance
- [ ] Caching