all repos — circe-vpn @ c05f1d69a28f6381049ceec6dc6234d316061bcb

Circe VPN

Far too much back-and-forth
Juniper Beatitudes [email protected]
Sun, 19 Jul 2026 20:26:29 -0500
commit

c05f1d69a28f6381049ceec6dc6234d316061bcb

parent

acb3830f6aba59e5c3d3ef3ecfa6fc530f8d14e4

5 files changed, 48 insertions(+), 84 deletions(-)

jump to
M crossfiles/x86_64-linux.inicrossfiles/x86_64-linux.ini

@@ -9,4 +9,7 @@ [host_machine]

system = 'linux' cpu_family = 'x86_64' cpu = 'x86_64' -endian = 'little'+endian = 'little' + +[properties] +needs_exe_wrapper = false
M flake.lockflake.lock

@@ -1,60 +1,7 @@

{ "nodes": { - "esp32-overlay": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1767865407, - "narHash": "sha256-QWF1rZYd+HvNzLIeRS+OEBX7HF0EhWCGeLbMkgtbsIo=", - "owner": "mirrexagon", - "repo": "nixpkgs-esp-dev", - "rev": "5287d6e1ca9e15ebd5113c41b9590c468e1e001b", - "type": "github" - }, - "original": { - "owner": "mirrexagon", - "repo": "nixpkgs-esp-dev", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1767799921, - "narHash": "sha256-r4GVX+FToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d351d0653aeb7877273920cd3e823994e7579b0b", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { "lastModified": 1782847225, "narHash": "sha256-JC9PjqKYG9ve5U8aDOLQipp3+KLANBHUvGdLZlxzdKI=", "owner": "nixos",

@@ -71,23 +18,7 @@ }

}, "root": { "inputs": { - "esp32-overlay": "esp32-overlay", - "nixpkgs": "nixpkgs_2" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "nixpkgs": "nixpkgs" } } },
M flake.nixflake.nix

@@ -15,14 +15,14 @@ let

system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; main_shl = pkgs.mkShell { - name = "circe-tooling-env-aphrodite"; - packages = - (with pkgs; [ + name = "circe-tooling-env-x86_64-glibc"; + packages = ( + with pkgs; + [ meson ninja just gcc - pkgsCross.aarch64-multiplatform-musl.gcc clang-tools valgrind bear

@@ -30,14 +30,35 @@ tokei

ruby just-lsp just-formatter - ]); + ] + ); NIX_ENFORCE_NO_NATIVE = 0; hardeningDisable = [ "fortify" ]; }; + aarch64_musl_shl = pkgs.mkShell { + name = "circe-tooling-env-aarch64-musl"; + packages = ( + with pkgs; + [ + meson + ninja + just + clang-tools + valgrind + bear + tokei + ruby + just-lsp + pkgsCross.aarch64-multiplatform-musl.gcc + just-formatter + ] + ); + }; in { devShells.${system} = { default = main_shl; + aarch64_musl = aarch64_musl_shl; }; }; }
M justfilejustfile

@@ -2,10 +2,21 @@ targets := `find crossfiles -type f | awk -F'[/.]' '{print $2}' | sed -z 's/\n/|/g'`

bash := `which bash` list-targets: - @echo `echo '{{ targets }}' | sed 's/|/, /g'` + @echo '{{ targets }}' + +[working-directory('.')] +core target="x86_64-linux": (check-supported target) + @echo 'Building libcirce-core for target {{ target }}' + meson setup --cross-file $(pwd)/crossfiles/{{ target }}.ini build-{{ target }} + ninja -C build-{{ target }} libcirce-core.a + +[working-directory('.')] +test target="x86_64-linux": (check-supported target) + @echo 'Building libcirce-core for target {{ target }}' + cd build-{{ target }} && meson test [working-directory('.')] -core target: +check-supported target: #!{{ bash }} set -euo pipefail

@@ -13,10 +24,6 @@ if [[(! "{{ target }}" =~ ^({{ targets }})$) || (-z "{{ target }}")]]; then

echo "Target not supported. Use 'just list-targets' for a list of supported core targets." exit 1 fi - - echo 'Building libcirce-core for target {{ target }}' - meson setup --cross-file $(pwd)/crossfiles/{{ target }}.ini build-{{ target }} - ninja -C build-{{ target }} libcirce-core.a [working-directory('.')] cleanall:
M meson.buildmeson.build

@@ -69,8 +69,10 @@ unity_proj = subproject('Unity')

unity_dep = unity_proj.get_variable('unity_dep') runner_gen = unity_proj.get_variable('gen_test_runner') -if not meson.is_subproject() and not meson.is_cross_build() - example_test = meson.source_root() / 'test/test_example.c' +if not meson.is_subproject() and host_machine.system() == build_machine.system() and host_machine.cpu() == build_machine.cpu() + # Technically every target is 'cross-compiling', but Meson fails to properly detect usually if we can still run the test binaries. + message('Also building tests!') + example_test = meson.project_source_root() / 'test/test_example.c' example_test_runner = runner_gen.process(example_test) test( 'example_tests',