nandi/jolt-nativepublic Fork 0
5416ab2
Commits
Clone
git clone https://git.rickub.com/nandi/jolt-native.git
git clone ssh://git@rickub.com/nandi/jolt-native.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Run the glimmer-gfx counter from the repo root

`jolt gfx-demo` in a root deps.edn, delegating to the backend's own counter
task. It goes through `nix develop` because a nix-built jolt cannot dlopen
the host /usr/lib libX11 — a different glibc, which fails before dlopen
returns — and through a new #gfx shell rather than the default one because
the default evaluates the rust toolchain and every desktop build input to
hand a Clojure program a single dlopen target: 3.3s an invocation against
0.9s for a shell holding libx11 and nothing else.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-09-07T18:15:31-07:00 Browse files
5416ab2 parent: 8d68cc1
added deps.edn +9 -0
new file mode 100644
@@ -0,0 +1,9 @@
1+;; Nothing in this repo is Clojure — the crates are cargo's and nix's business,
2+;; and the justfile is their entry point. This file exists for the one thing
3+;; that is neither: running a backend's example from the repo root.
4+;;
5+;; Through `nix develop` because a nix-built jolt cannot dlopen the host
6+;; /usr/lib libX11 — different glibc, fails before dlopen returns. The #gfx
7+;; shell is that one library on LD_LIBRARY_PATH and nothing else, so entering
8+;; it costs under a second once its env derivation is built.
9+{:tasks {gfx-demo "nix develop .#gfx -c bash -c 'cd glimmer-backends/glimmer-gfx && jolt counter'"}}
new file mode 100644
@@ -0,0 +1,9 @@
1+;; Nothing in this repo is Clojure — the crates are cargo's and nix's business,
2+;; and the justfile is their entry point. This file exists for the one thing
3+;; that is neither: running a backend's example from the repo root.
4+;;
5+;; Through `nix develop` because a nix-built jolt cannot dlopen the host
6+;; /usr/lib libX11 — different glibc, fails before dlopen returns. The #gfx
7+;; shell is that one library on LD_LIBRARY_PATH and nothing else, so entering
8+;; it costs under a second once its env derivation is built.
9+{:tasks {gfx-demo "nix develop .#gfx -c bash -c 'cd glimmer-backends/glimmer-gfx && jolt counter'"}}
modified flake.nix +7 -0
@@ -243,6 +243,13 @@
243243 inherit libs libvidya libjolttui libjoltmoq;
244244 };
245245
246+ # Just the X11 client library on LD_LIBRARY_PATH, for `jolt gfx-demo`.
247+ # The default shell would do too, but it evaluates the rust toolchain
248+ # and the crane graph to hand a Clojure program one dlopen target.
249+ devShells.gfx = pkgs.mkShell {
250+ LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.libx11 ];
251+ };
252+
246253 devShells.default = pkgs.mkShell ({
247254 packages = [ rustToolchain pkgs.just pkgs.sccache pkgs.cargo-nextest ]
248255 ++ nativeBuildInputs
@@ -243,6 +243,13 @@
243 inherit libs libvidya libjolttui libjoltmoq;243 inherit libs libvidya libjolttui libjoltmoq;
244 };244 };
245 245
246+ # Just the X11 client library on LD_LIBRARY_PATH, for `jolt gfx-demo`.
247+ # The default shell would do too, but it evaluates the rust toolchain
248+ # and the crane graph to hand a Clojure program one dlopen target.
249+ devShells.gfx = pkgs.mkShell {
250+ LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.libx11 ];
251+ };
252+
246 devShells.default = pkgs.mkShell ({253 devShells.default = pkgs.mkShell ({
247 packages = [ rustToolchain pkgs.just pkgs.sccache pkgs.cargo-nextest ]254 packages = [ rustToolchain pkgs.just pkgs.sccache pkgs.cargo-nextest ]
248 ++ nativeBuildInputs255 ++ nativeBuildInputs