Repository navigation
Redo the public API to be simpler - #7
Merged
Merged
Conversation
linkVelopack + addVelopackedAppDir now cover the whole flow. Consumers no longer construct the `vpk pack` command line, pin `vpk` in their own `.config/dotnet-tools.json`, or wire up an MSVC toolchain by hand. - linkVelopack gains `handle_libc` (default on): for *-windows-msvc it resolves a --libc manifest, installs MSVC + the Windows SDK when the host has nothing usable, scopes a command-line --libc to the msvc compiles instead of leaving it on host-side tools, and applies the manifest to every reachable *-windows-msvc compile. - addVelopackedAppDir runs `vpk pack` over a staged directory and returns the InstallDir step. addVelopackStep + outputDir are the escape hatch. - vpk is installed into <build_root>/.velopack-tools, gated behind `install_vpk` so an un-gated build never reaches NuGet, and pinned by default to the release the bundled runtime comes from. - linkVelopack links advapi32; the Rust core needs SystemFunction036. - trim-velopack-lib deletes every compiler_builtins member, not just the first. arm64 ships 237 of them, which broke aarch64-windows-msvc. - gen_zig_libc_msvc makes the SDK usable on case-sensitive filesystems by symlinking the spellings its headers and linker directives actually use. Verified from a Linux host: x86_64/aarch64 linux-gnu and windows-msvc all package end to end. macOS targets need a macOS host; vpk refuses otherwise.
extra_args becomes extra_vpk_args, and extra_vpk_path_args joins it for flags whose value is a file this build produces (--releaseNotes and friends); the pack step waits on whatever generates it. Between those two and vpk_argv, anything the modelled options don't cover is reachable. README gains a section on customizing the vpk command and links into Velopack's own docs — the CLI reference per platform, signing, channels, deltas, cross compiling, distributing. test/sample is a minimal consumer (link the runtime, stage a payload, package it, exercising both new arg options). test/package.sh builds and packages it and checks vpk produced a nupkg, a RELEASES feed and an installable artifact. The workflow is just the platform matrix plus dotnet/zig setup calling that script.
MichaelBelousov
commented
Sep 7, 2026
- test/package.sh drops `zig build --fetch=all`; verified with a fresh --global-cache-dir that Zig fetches the lazy squashfs dep on its own and still builds the AppImage. - VelopackedAppDirOptions holds a `pack_opts: VelopackOptions` instead of restating every field, which drops the comptime field-copy loop. - FIXME on `depends_on`: needing it at all says the wrapper is too coarse. - Trim the addVelopackStep doc comment. The sample now defaults to the MSVC ABI on Windows hosts. Zig's native Windows default is gnu, so CI was linking Velopack's MSVC-only runtime into a gnu build and lld-link went looking for libLIBCMT.a. linkVelopack now rejects a non-MSVC Windows target outright rather than failing at link.
gen_zig_libc_msvc.zig now just describes the SDK's layout and calls symlink-bad-cased-include-tree.zig, which owns the technique and documents why it works: the inconsistency is in the references, not the files, so the pass enumerates every spelling the headers use (exhaustive) and guesses the few that only exist inside binary /DEFAULTLIB: directives (not). Verified against a synthetic SDK tree: lowercase aliases, enumerated #include and comment(lib) spellings, multi-component paths, and the guessed library variants all resolve.
`push` on every branch duplicated the `pull_request` run; restrict it to main and cancel superseded runs. macos-latest is macOS 26, whose SDK Zig 0.15.2 cannot link against — it failed building its own build runner, before this package was reached. Pinned to macos-15.
Collaborator
|
Looks good to me, this is an improvement! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace public API used in graphl with:
linkVelopackaddVelopackedAppDirConsumers no longer construct the
vpk packcommand line, pinvpkin their own.config/dotnet-tools.json, or wire up MSVC for windows cross compilationhandle_libcfor handling libc needed by velopack runtime on windowsvpk packover a staged directory and returns the InstallDir stepinstall_vpkbuild option so users never accidentally installvpk, they must opt-in for the non-zig dependency