Requirement: admin-free self-hosted install + Windows support
Origin
Julian (via Grok Bot, 2026-11-25, Europe/Berlin): when lic is self-hosted, installation must work without admin/root rights (pure user-space) and be installable on Windows.
This issue records the requirement, an assessment of main as of f70d1357d17c (merged 2026-11-25 06:11 Europe/Berlin: refactor/carve-lig-resident-fock), and a phased checklist. No code or roadmap-file change is made here. A later Cursor cloud-agent MR can add a short roadmap bullet (proposed text at the bottom). No merge without Julian’s yes on a concrete head.
Inspected read-only: GitLab project 1 (li-langverse/lic), public main, release v0.2.0, install/packaging scripts, CI, runtime POSIX/Windows shims, and the issue/MR/branch tracker. There is no existing issue for this requirement.
Current state
Linux user-space install — mostly already there
scripts/install.shdelegates toscripts/install-li.sh.- Default prefix is already
~/.local(LI_INSTALL_PREFIX/--prefix). No sudo in the default path. --systeminstalls to/usr/localand may need sudo; that must stay optional.ensure_pathonly printsexport PATH="$HOME/.local/bin:$PATH"; it does not offer to append a user shell-profile line.- Prebuilt path: download
lic-VERSION-linux-amd64.tar.gzfrom GitLab Releases and unpack under the prefix (bin/+share/lic/). - From-source path still tells a non-root user to
sudo bash scripts/ci-install-llvm.sh. That violates the new requirement if the user has no prebuilt and no system LLVM. .deb/ AUR / RPM / Snap / Flatpak are root/system channels and must remain optional, not the self-hosted default.packaging/debian/rulesinstalls to/usr/bin.- The published v0.2.0 Linux asset (
lic-0.2.0-linux-amd64.tar.gz, built from1dcd91eef, not the tag commit0e8443c) is a real compiler (lic --version→lic 0.2.0) but is dynamically linked againstlibz3.so.4,libzstd, andlibz. A user-space install therefore still needs those libraries on the machine (or we must bundle / statically link them). install-gate:linuxexists and installs into a temp prefix, but the job runs as root inubuntu:24.04(apt-getinbefore_script). It is not a non-root-user acceptance test. It only runs when install/packaging files change.
Windows — scaffolding exists; no real published compiler
- v0.2.0 has no Windows asset. The release description is explicit: “Windows: there is no Windows build for v0.2.0, and no windows-amd64 asset is attached.” (Julian accepted “no Windows stub” when the Linux asset was published, 2026-11-18.) Earlier memory that a windows-amd64 file was attached is wrong.
- Repo still has a stub path:
scripts/windows-native-stub-release.ps1compilesscripts/stub-lic.ctolic.exethat reportslic $VERSION-stub. CI jobrelease-stub-windows-amd64isallow_failureand needs an unregisteredhomelab-windowsrunner.scripts/install.ps1refuses a stub when-NativeOnly/-NoWslis set. scripts/check-release-assets.shdoes require bothlic-<ver>-windows-amd64.zipandlic-<ver>-linux-amd64.tar.gz(name + downloadable link). It does not check that the Windows zip is a real compiler rather than a stub. On currentmain,VERSIONis0.3.0and there is nov0.3.0tag, so the strict gate is deferred until that tag exists (version:mr/version:maincomments). Tightening the gate to reject stubs should happen when a real Windows asset is first published (target: v0.3.0, not a late stub on v0.2.0).- Native installer scripts:
scripts/install.ps1/install-native.ps1: default prefix is%USERPROFILE%\.local(Unix-like, not%LOCALAPPDATA%\Programs\lic). PATH is updated via HKCUEnvironment\Pathonly (no HKLM). Good for admin-free.installer/LiCompiler.iss:PrivilegesRequired=lowest, PATH via HKCU,DefaultDirName={autopf}\Li(Inno: user-local{localappdata}\Programswhen not elevated). Version strings still say0.1.0. A setup.exe is not on the v0.2.0 release.- Scoop / Winget / Chocolatey manifests exist but are placeholders at
0.1.0withPLACEHOLDER_SHA256_*and no published zips.
- Default Windows docs still push WSL as the way to get a full compiler.
install-li.sh --from-sourceexits on native Windows and tells the user to use WSL. That is incompatible with “installable on Windows” as a first-class, admin-free path. scripts/build.ps1/setup-llvm-dev.ps1already describe a user-space Windows toolchain: download the officialclang+llvm-22.*-x86_64-pc-windows-msvctarball intotools/llvm-22(no admin, notC:\Program Files\LLVM), then CMake+Ninja withclang/clang++(notcl.exe). Git Bash is required. This is the right direction; it is not exercised by a required CI job today.- Windows CI (
install-gate:windows,release-artifacts:windows) isallow_failure: true, taggedhomelab-windows(runner not registered), and the remainingrulesstill mention the deleted branchcursor/lic-install-distribution. These jobs do not run on ordinary MRs tomain.
Toolchain / POSIX / runtime
| Area | State on main |
|---|---|
| Build on Windows | Intended: Clang + Ninja + LLVM 22 MSVC-style prebuilt (user-local tools/llvm-22 or Program Files). CMake has MSYS2/MinGW definition workarounds. Historical li-chem ABI bugs on MSVC-hosted Li program codegen (docs/handoff-lic-windows-abi-and-build-memory.md, mid-2026) are still a risk for Windows-hosted lic output, even though default lic builds no longer embed li-chem/GTO. |
li_rt process |
fork/waitpid already shimmed with _spawnvp on _WIN32. li_rt_exec_native_ir_build is explicitly unsupported on Windows. |
| Sockets | runtime/li_rt_posix_compat.h + li_rt_winsock.c: Winsock, WSAPoll, closesocket, nonblocking, setsockopt wrappers. Unmerged June branches (fix/windows-winsock-runtime, fix/windows-msys2-build, …) look partly superseded by what is already on main; treat them as audit material, not merge-as-is (they are stale: 2026-06-03/04, merged=false). |
| epoll / httpd | packages/li-net epoll path is Linux-real; non-Linux gets stubs (epoll_create1 → -1). li-httpd is a package (packages/li-net-httpd); default listen in examples/README is 8080, TLS examples 8443 (unprivileged). No setcap in installer scripts. Homelab deploy TOML may use /etc/li-httpd/certs — that is cluster deploy, not the compiler install. Self-hosted compiler install must not require ports < 1024. Full Windows IOCP/httpd parity is out of scope for the first install milestone. |
| mmap / AF_UNIX | Still used in some package natives (e.g. llm cache mmap, net reactor unix sockets). Need #ifdef or shims before those packages are part of a Windows default runtime. |
| Lean / AutoVC | Pin is leanprover/lean4:v4.35.0. elan works on Windows in principle; there is no Windows Lean CI job. Basic install smoke (lic --version, compile examples/hello.li) must not require Lean. Full --lean verify on Windows is a later phase. |
| Path handling | Prefix layout is portable ($prefix/bin, $prefix/share/lic). Compiler must keep locating std/runtime via LI_REPO_ROOT / install prefix, never /usr/local or C:\Program Files hardcoded. |
Roadmap / tracker
- No root
ROADMAP.md. Canonical ecosystem roadmap is pointed atdocs/ecosystem/vision-and-roadmap.md(stub →li-langverse/roadmap). Install guides:docs/guide/install.md,install-linux.md,install-windows.md. - GitLab labels in lic:
P0,R1,bug,ci,flaky,hardening,paper,parked,priority::high,security,soundness,spec,v0.2.0,verify. There is noroadmaplabel, so this issue is filed unlabelled rather than inventing one. - No open issue already covers admin-free install or first-class Windows support.
Blockers (ordered)
- No real Windows
lic.exerelease asset — this is the critical path. Stub machinery must not be published as the official windows-amd64 artifact. - No required Windows CI runner (
homelab-windowsunregistered). Acceptance needs a non-admin Windows job (self-hosted or a cloud Windows runner Julian approves). - Residual POSIX in default runtime/packages (epoll no-ops,
li_rt_exec_native_ir_build, mmap/AF_UNIX in optional packages) and historical Windows ABI risk for generated code. - Linux prebuilt is not fully self-contained (dynamic
libz3/libzstd/libz); from-source still documentssudofor LLVM. - Packaging placeholders (scoop/winget/choco/Inno version
0.1.0, placeholder hashes) and Windows default prefix~\.localrather than%LOCALAPPDATA%\Programs\lic. check-release-assets.shwill accept a stub zip if one is attached under the expected name. Must be tightened when a real asset ships.- Lean/AutoVC on Windows is unverified (not a blocker for install smoke).
Phases and effort
Effort: S ≈ days, M ≈ 1–2 weeks, L ≈ multi-week / needs a runner or substantial port.
- Phase A — Linux admin-free hardening (S). Keep tarball +
install.sh --prefix=$HOME/.localas the official self-hosted path (no sudo). Optionally append a user profile PATH line when asked. Document or bundle/static-linklibz3/libzstd/libzso a non-root machine can run the prebuilt. From-source: user-local LLVM (already the pattern inscripts/llvm-env.sh/tools/) instead ofsudo ci-install-llvm.sh. CI: install-and-smoke as a non-root user in a container (drop privileges after image setup; prefix under$HOME/.local;lic --version+lic build examples/hello.li)..deb/system packages stay optional. - Phase B — Real Windows compiler, no stub (L, critical path). Make
scripts/setup-llvm-dev.ps1+scripts/build.ps1produce a non-stublic.exe+li_rtand stagelic-VERSION-windows-amd64.zip. Audit stale Junefix/windows-*/fix/winsock-*branches against currentmain(do not merge wholesale). Re-check Windows-hosted codegen ABI on a small smoke (hello + a non-chem contract). Leave li-httpd/epoll feature parity for Phase E. Do not attach a stub to a tagged release. - Phase C — Windows admin-free installer (M, after a real zip). Official prefix
%LOCALAPPDATA%\Programs\lic(or document~\.localas a compat alias). PATH via HKCU / user environment only; no HKLM, no admin MSI. Ship zip + Scoop manifest + Winget user-scope portable installer; InnoPrivilegesRequired=lowestonly if we also ship Setup.exe. Refresh 0.1.0 placeholders.install.ps1 -NativeOnlymust succeed without WSL and must fail closed on a stub. Self-update: extendinstall-upgrade/Install-LiUpgradePurgeto the Windows zip path (partially present). - Phase D — Lean / AutoVC on Windows (M, optional for install). elan +
lean-toolchain4.35.0 in user space; a CI verify job can start asallow_failure. Not required to close the install requirement. - Phase E — li-httpd / net on Windows (M–L, after B). Keep defaults on unprivileged ports (8080/8443). Replace epoll stubs with a WSAPoll/IOCP reactor only as needed. Unix sockets / privileged ports /
setcap/ system systemd units stay out of the default install. - Phase F — Release-asset honesty + required gates (M, when a tag exists).
check-release-assetsmust require a non-stub windows-amd64 zip (e.g.lic --versioninside the unpacked zip must not match*-stub). Turn on a required Windows non-admin install-and-smoke job once a runner exists. Do not weaken the gate; do not publish a stub to satisfy it.
Acceptance criteria
- A non-root Linux user in a container can install with
install-li.sh --prefix="$HOME/.local"(no sudo) and runlic --versionplus a hello-world build. - A non-admin Windows user can install from a published
lic-*-windows-amd64.zip(or Scoop/Winget user-scope) into a user prefix, get a User-PATH update without HKLM, and runlic --versionplus hello-world without WSL and without a stub. - CI jobs exist for both cases (Windows job may start optional until a runner is registered, then become required).
- Tagged releases that
check-release-assetscovers include a real Windows zip, or the Windows name is not listed as satisfied by a stub. - Self-hosted docs lead with the admin-free path;
--system/.deb/ WSL are clearly optional.
Librebase compatibility
- lic must stay Librebase-compatible: do not hardcode
/usr/local,/opt,/etc, orC:\Program Filesinto compiler or runtime lookup. Keep the existing prefix layout ($prefix/bin,$prefix/share/licwithstd/runtime) andLI_REPO_ROOT/LI_INSTALL_PREFIXso Librebase can invokelicfrom a user prefix on PATH. - Default lic already opts out of li-chem / studio embeds (
LI_WITH_LI_CHEM/LI_WITH_STUDIOoff). Windows/Linux install artifacts should stay on that slim default. - A Librebase self-host as a user service must not require root to install or upgrade lic.
- Code changes only via Cursor cloud-agent MRs; no merge without Julian’s OK on a concrete head.
Proposed roadmap bullet (do not edit files in this issue)
For a later MR to docs/guide/install.md and, if maintainers want, li-langverse/roadmap:
Self-hosted lic: installation must work without admin/root (user-space prefix:
~/.localon Unix,%LOCALAPPDATA%\Programs\licon Windows) and must be a first-class Windows install (reallic.exe, no stub, no WSL required). System packages and WSL remain optional. See lic#NNN.
Suggested first cloud-agent MR
Phase A only (Linux non-root install-and-smoke CI + prebuilt dependency/docs + no-sudo from-source LLVM hint). Small, does not wait on a Windows runner, and delivers half of Julian’s requirement with low risk.
Phase B (real Windows lic.exe) is the critical path after that; it needs either a registered homelab-windows runner or another Windows CI Julian approves, and should be a separate MR.