Skip to content

Releases: Open-Tech-Foundation/Win-Runner

Release list

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 15:03
32fdec8

Added

  • cmd.exe built-ins dir (/b, /s, /a[:attributes], /o[:order],
    with Windows' listing layout and summaries), ren/rename (wildcard
    templates such as ren *.txt *.bak), move, and path.

  • find.exe (/V /C /N /I, files or standard input), sort.exe (/R,
    /+n, /O), and more.com in System32, so cmd /c "dir | find ..."
    and friends work. A new cmd_builtins Windows oracle covers them.

  • The npm-packaged tools run: CommandLineToArgvW, combase.dll's COM
    memory and GUID functions (biome), and for opencode (a Bun executable)
    timeBeginPeriod/timeEndPeriod, RtlGetFullPathName_U,
    NtQueryObject (ObjectBasicInformation, and ObjectNameInformation
    giving a file's NT path), and GetConsoleTitleA/W. SetConsoleTitleW
    now keeps the title and shows it in the terminal (OSC 0).

  • wpkg installs npm tarballs (.tgz/.tar.gz package URLs), so tools
    npm ships as prebuilt Windows binaries install without npm:
    wpkg install opencode, wpkg install esbuild, wpkg install biome
    (x64 and arm64, from their npm platform packages).

  • wpkg install python installs python.org's full NuGet distribution
    instead of the embeddable one, so site, exit(), venv, and pip
    work. Running it needed:

    • CRT _wgetcwd/_getcwd and iswctype; PathCchRemoveFileSpec;
      SetHandleCount; SetWaitableTimerEx.
    • ConvertStringSecurityDescriptorToSecurityDescriptorW (SDDL owner,
      group and DACL), which CPython uses for private directories.
    • CLSIDFromString, IIDFromString, StringFromGUID2, UuidCreate,
      UuidCreateSequential, and SHLWAPI!StrStrW/StrStrIW.
    • CertCreateCertificateContext, collection stores
      (CERT_STORE_PROV_COLLECTION, CertAddStoreToCollection) and store
      providers named by string ("Memory"), as pip's truststore and
      CPython's ssl use them.
    • A real FormatMessageA/W: system messages for common Win32, Winsock
      and certificate codes, FROM_STRING with %1 inserts, and
      FORMAT_MESSAGE_ALLOCATE_BUFFER (Python's WinError text was garbage).
    • SetFileInformationByHandle(FileBasicInfo) for times and attributes
      (CPython's os.chmod on a descriptor).
      Oracle cases cover the new version, string-search, attribute-list and
      FileBasicInfo behavior.
  • GetVersionExA/W, and GetVersion/GetVersionEx report the version a
    program's manifest asks for, as Windows does: 10.0 to a program declaring
    Windows 10 support (Python's interactive prompt now starts), 6.3 build
    9600 for Windows 8.1, and 6.2 build 9200 otherwise. The native_startup
    oracle checks the unmanifested case.

  • ScrollConsoleScreenBufferW for full-width vertical moves (mapped to the
    terminal's scroll region), so Python 3.14's new REPL (pyrepl) runs; other
    moves report ERROR_NOT_SUPPORTED.

  • The native_startup oracle checks a certificate chain under an engine
    whose exclusive root store holds the certificate, replacing a case that
    chained the machine's first ROOT certificate (which differs per machine:
    the CI runner's is explicitly distrusted).

  • GetMaximumProcessorGroupCount, GetActiveProcessorCount and
    GetMaximumProcessorCount (one processor group), which the .NET 10
    CoreCLR calls at startup.

  • where.exe in System32: finds files in the current directory and along
    PATH with PATHEXT extensions (/Q, /F, /R), exiting 1 with
    Windows' message when a pattern matches nothing.

  • Get-ChildItem on registry paths (HKLM:\…, HKCU:\…) lists subkeys
    under a Hive: header and yields key objects with Name and
    PSChildName in value position; Get-Content on a registry path
    reports the provider's error instead of a bad file path.

  • $_ in a catch block is an error record with .Exception.Message.

  • A Windows-oracle script, tests/oracle/powershell_expressions.ps1,
    for the expression engine and the new cmdlets.

Fixed

  • Matched against Windows: a comma list written in a native command's
    arguments (cmd /c echo a,b) reaches the program as one argument with
    its commas; only array variables pass their elements separately.
    more.com adds its trailing empty line only for piped input.

  • Matched against Windows: cmd's path prints PATH=(null) when PATH is
    unset; find.exe exits 1 (not 2) when a file is missing; more.com
    ends its output with an empty line.

  • The headless control test retries WebSocket reads a signal interrupts.

  • PowerShell command arguments understand arrays: comma lists (a,b,
    "a", "b") and array variables are passed as arrays instead of one
    joined string. Path cmdlets (Get-Content, Remove-Item, Test-Path,
    New-Item, Copy-Item, …) act on each path; Set-Content/Add-Content
    write each element as a line; Write-Output (and echo) output each
    argument and element on its own line, Write-Host separates them with
    spaces; script parameters receive arrays; programs get each element as
    an argument. Other cmdlets see the joined text as before.

  • PowerShell passes cmd.exe, cscript.exe, wscript.exe, find.exe,
    sqlcmd.exe and batch/script files their arguments the legacy way, as
    its default $PSNativeCommandArgumentPassing (Windows) does: embedded
    quotes as typed, so cmd /c 'find "x" file' reaches cmd intact.

  • Directories created in the guest get creation and write times (dir
    showed 01/01/1970).

  • Socket handles fit in 32 bits, as Windows guarantees: OpenSSL keeps
    sockets as int, so TLS in Python failed with WSAEFAULT.

  • InitializeProcThreadAttributeList accepts an empty list, which
    CPython's subprocess always builds.

  • _open_osfhandle gives descriptors to device handles, so open("nul")
    works instead of failing with EMFILE.

  • CreateFileMappingW and SetFileInformationByHandle follow
    DuplicateHandle copies to their file (CPython's mmap).

  • Enumerating a collection store walks every member store's
    certificates; CertGetEnhancedKeyUsage uses the real
    CERT_FIND_EXT_ONLY (2) and CERT_FIND_PROP_ONLY (4) flags.

  • FindFirstFileW applies Windows' DOS pattern rules: *.* matches every
    name (directories without a dot included), name.* matches name, and
    *. matches names without an extension plus . and .., so
    programs listing with *.* (CPython's os.listdir) see every entry.
    The fs_paths oracle covers it.

  • The apc_io oracle accepts both outcomes Windows documents for an
    overlapped read at end of file (an immediate ERROR_HANDLE_EOF, or a
    queued completion carrying it), and counts each callback relative to the
    calls before it, so one cache-dependent result no longer fails later
    cases on Windows.

  • Group-Object tables use PowerShell's GroupInfo layout (Count 5 wide,
    Name 25, longer names end in …); Format-Table aligns number columns
    right; Out-String makes one string ending in a newline (a blank line in
    output, one string when assigned or used in "$(...)").

  • The powershell_expressions oracle captures each formatted block alone
    and avoids hashtable key order, which is hash order on Windows.

  • "$(...)" joins multiple output objects with spaces, as PowerShell
    does, instead of keeping line breaks.

  • Member access on an array enumerates its elements' members.

  • Get-Command with a plain name returns the command that would run (an
    alias or built-in before a program, else the first program on PATH).

  • 1 + '1' converts the string to the left operand's number type.

  • Objects from ConvertFrom-Json and hashtable literals keep their key
    spellings in JSON and table output.

  • PowerShell utility cmdlets: Get-Date (with .NET -Format strings),
    Get-Random, Out-String, Format-Table/Format-List,
    Group-Object, ConvertTo-Json (-Depth, -Compress) and
    ConvertFrom-Json (objects keep member access when assigned),
    Read-Host, Get-Process (this session's guest processes),
    Start-Process (runs to completion), and Get-ItemPropertyValue.
    Get-Command accepts several names (Get-Command cmd,tar).

  • A PowerShell expression engine for statements and assignments:
    arithmetic (1+1, 7/2, %, kb/mb suffixes, hex), string and array
    repetition and concatenation, arrays (1,2,3, @(...), ranges
    1..5, negative indexes), hashtable literals with entries, comparison
    operators (with c/i forms and array filtering), -like, -match,
    -replace, -split, -join, -contains/-in, -is/-as, logical
    and bitwise operators, -f formatting (N, D, F, X, P), casts
    with .NET's range checks and rounding, [math]:: and [string]::
    members, and common string, array and hashtable properties and methods.
    Statements it does not cover keep their previous handling. $s += "x"
    now concatenates strings and [bool]'0' is True, as in PowerShell.

  • winrun --help (-h) prints the usage and winrun --version (-V) the
    version, both exiting 0.

  • PowerShell scripts take arguments (winrun script.ps1 -Name x, a script
    run in the shell, & .\script.ps1 a b): a leading param(...) block
    (after comments and attributes such as [CmdletBinding()]) binds them by
    name or position with its defaults; without one they are $args. A
    script run from a host path runs in the shell, so it can start programs.

  • taskkill.exe in System32, as Windows ships it: /PID and /IM (with
    * wildcards), /F, and /T (descendants first), with Windows' messages
    and exit codes (128 when nothing matches). It finds guest processes in a
    per-session process table: each worker registers its PID (its host PID),
    parent and image, with its kernel start time so a reused PID is never
    signalled. Programs that end a child with taskkill /F /T (esdev's test
    timeout) no longer wait forever. The native_startup oracle probe ends a
    copy of itself this way.

  • Certificate chains: CertGetCertificateChain (built and verified with
    rustls-webpki against the gues...

Read more

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 14:53
65e5c34

Added

  • Release packaging for GitHub: release.toml and the generated
    .github/workflows/release.yml build target/release/winrun on main,
    publish a checksummed archive with build provenance attestation, and use
    the curated changelog notes.

  • CertAddEncodedCertificateToStore with the CERT_STORE_ADD_*
    dispositions, for memory and system stores (additions stay with the open
    store; a certificate matches another with identical encoded bytes).

  • WSADuplicateSocketW for the calling process with WSASocketW from its
    protocol info (Rust's TcpStream::try_clone); closing one handle of a
    duplicated socket leaves the connection to the others. Sharing a socket
    with another process is not supported yet (WSAEINVAL).

  • What CPython 3.14 (wpkg install python) needs to run, asyncio included:

    • CRT: _wopen/_open, _lseek, _dup/_dup2, _commit, _chsize_s,
      _umask, _chmod/_wchmod, the _stat64i32 family, _wputenv_s,
      __doserrno, _set_errno, _getpid, _set_abort_behavior,
      _crt_at_quick_exit, clock, __daylight, __sys_errlist/
      __sys_nerr, __fpe_flt_rounds, _dclass, copysign, fabs, hypot,
      expm1, erf, erfc; _read, _write, _close, _open_osfhandle
      and _get_osfhandle under their api-ms-win-crt names. _read ends at a
      broken pipe and failures set errno and _doserrno (_dosmaperr).
    • PathCchSkipRoot, PathCchCombineEx, PathCchCanonicalizeEx,
      VerifyVersionInfoA, LCMapStringEx, inet_ntop,
      WSAStringToAddressW, and the DisconnectEx and TransmitFile
      (WSAEOPNOTSUPP) extension functions.
    • Overlapped WSARecv/WSASend that cannot finish at once pend (also on
      non-blocking sockets) and complete through the completion port;
      CancelIoEx and closesocket cancel them (and pending AcceptEx) with
      ERROR_OPERATION_ABORTED; pending operations mark their OVERLAPPED
      STATUS_PENDING; GetOverlappedResult reads socket results.
    • RegisterWaitForSingleObject waits on any waitable object, and a
      one-shot wait stays registered until UnregisterWait(Ex).
      The overlapped_sockets oracle probe records the proactor behavior on
      Windows; native_startup records committing memory without a reservation.
  • wpkg install for Bun, Deno, uv, fd, bat, fzf and the GitHub CLI (gh),
    x64 and ARM64, pinned to each release's published SHA-256.

  • GetHandleInformation; PE resources (FindResourceA/W,
    FindResourceExA/W, LoadResource, LockResource, SizeofResource,
    FreeResource) read from the mapped image's resource directory;
    SHGetKnownFolderPath for the standard known folders;
    GetPerformanceInfo/K32GetPerformanceInfo; and
    RtlGetNtVersionNumbers. The native_startup oracle probe records each on
    Windows.

  • tar.exe in System32, as Windows 10+ ships it (bsdtar's command line):
    -c/-x/-t (also the bundled tar xzf form), -f (with - for
    standard streams), -C, -z/-j/-a/--format zip, -v, -k, -O,
    --strip-components, --exclude and member patterns. Reading detects
    gzip, bzip2 and zip by content; members naming .. are refused.

  • curl.exe in System32, as Windows 10+ ships it: curl's command line
    (-o/-O/--output-dir, -L, -f/--fail-with-body, -s/-S,
    -I/-i/-D, -X, -H, -d/--data-*/--json/-G, -T, -u,
    -A, -k, --compressed, -w, -m, --retry, -v) and exit codes,
    running natively in the guest over the built-in HTTP client and trusting
    the guest's ROOT certificate store.

  • An HTTP/1.1 client (http_client) for the guest's built-in network tools:
    plain and TLS (rustls) connections verified against the guest's own ROOT
    store, redirects, chunked and length-delimited bodies, gzip/deflate
    decoding, timeouts, and curl-compatible error codes and messages.

  • C++ RTTI from VCRUNTIME140: __RTDynamicCast (dynamic_cast down and
    across single, multiple and virtual inheritance, throwing std::bad_cast
    for a failed reference cast), __RTCastToVoid and __RTtypeid (throwing
    std::bad_typeid for a null object). The cxx_eh oracle covers them.

  • GetProcessId for the current process and child process handles. The
    native_startup oracle compares it with CreateProcessW's process id.

  • MSVC exception handling from VCRUNTIME140: _CxxThrowException,
    __CxxFrameHandler3 (try/catch by type, value, reference and ...,
    rethrow, throws from catch blocks, destructor and cleanup funclets) and
    __C_specific_handler (__except filters, __finally). Rust programs
    built for x86_64-pc-windows-msvc now unwind panics: catch_unwind,
    #[should_panic], failing assert!s and expects in test harnesses, and
    thread panics behave as on Windows instead of stopping the process. New
    cxx_eh and rust_unwind Windows oracles check both.

  • Native Win32 mutexes (CreateMutexA/W, CreateMutexExA/W,
    OpenMutexA/W, ReleaseMutex) with owner recursion, names, waits
    (including wait-all) and handle duplication, plus BCryptGenRandom,
    CertOpenSystemStoreA/W, CertGetIntendedKeyUsage, CompareFileTime,
    GetFileTime, GetFileAttributesA, MoveFileExA, and the CRT's
    strtoll/_strtoi64, _byteswap_*, isxdigit and _difftime64. The
    official Windows curl (wpkg install curl) now downloads over HTTPS
    natively. A new sync_crypto Windows oracle checks these APIs.

  • PowerShell values: X -split P and X -join S in assignments, and quoted
    patterns containing . in conditions ($v -like "*-canary.*"), $_ bound
    to the error inside catch, and $v = 'a|b' kept as one string instead of
    a pipeline. Bun's
    official installer (powershell -c "irm bun.sh/install.ps1|iex") now
    installs Bun through the native wpkg curl, creates bunx.exe, adds it to
    the user PATH, and registers the uninstaller, as on Windows. Tests cover
    the generic PowerShell and Win32 behavior, not Bun itself.

  • PowerShell scripts run programs natively: & "C:\app.exe" args, bare names
    resolved on the guest PATH with PATHEXT, .ps1 files inline, output
    captured by $(...) and assignments, $LASTEXITCODE (exit codes as signed
    32-bit numbers), and standard error merged into output by 2>&1 or
    dropped by 2>$null. Write-Warning and
    Write-Error write to standard error (Write-Error stops under
    $ErrorActionPreference = 'Stop').

  • PowerShell Add-Type -MemberDefinition declares [DllImport] functions
    answered by built-in implementations (IsProcessorFeaturePresent from the
    host CPU, SendMessageTimeout broadcasts), callable as
    [Ns.Name]::F() or (Add-Type ... -PassThru)::F(). Scripts also get
    [Type] casts ([int], [char]27, [IntPtr] 0xffff, [ref] $x),
    -as [Type], here-strings (@"..."@, @'...'@), backtick escapes
    (`n, `", `$) and "" inside double-quoted strings.

  • PowerShell expressions: -lt/-le/-gt/-ge (numeric when both sides
    are numbers), -like/-notlike, integer-aware -eq, -not (...) and
    !x over compound conditions, and comparisons as values and statements.
    [Environment]::OSVersion (and other [Environment] properties) report
    the guest's Windows build, property paths work in conditions, $null = x
    discards, $global:/$script: names resolve, -ErrorAction SilentlyContinue|Ignore swallows a command's error, mkdir and New-Item
    yield the created path in value position, backtick line continuations
    join cleanly, and "...$(...)..." keeps the quotes inside its code.

  • PowerShell gains the registry provider: Get-Item, New-Item,
    Remove-Item and Test-Path on HKLM:/HKCU: paths, Get-/New-/
    Set-/Remove-ItemProperty, and RegistryKey objects with OpenSubKey,
    CreateSubKey, GetValue (with DoNotExpandEnvironmentNames),
    GetValueKind, SetValue, DeleteValue and name listings, backed by the
    guest hives. Commands work as if conditions, (expr).Member is a
    statement, [Type]::Member reads registry enums and [IntPtr]::Zero, and
    a missing object member reads as $null. A new powershell_scripting.ps1
    Windows oracle checks these against real PowerShell, and both oracle
    runners now run every tests/oracle/*.ps1.

  • PowerShell scripts and functions accept param(...) blocks with typed,
    [switch] and defaulted parameters bound by name (-Name value,
    -Name:value, unique prefixes) or position, and return outputs its value
    and leaves the function or script. Installer scripts such as Bun's start
    with these.

  • Add native console input/output code-page getters and setters, with
    independent shared state across child workers and explicit rejection of
    unsupported encodings. Add GetCurrentThreadStackLimits using native TEB
    stack bounds, and a Windows oracle covering console changes, invalid pages,
    child-process sharing and stack queries on main and created threads.

  • Add native OpenThread, GetThreadId, GetProcessIdOfThread,
    GetExitCodeThread, GetThreadTimes, and GetThreadDescription, with
    shared native guest thread objects, per-handle access checks, retained
    termination state and Linux thread CPU accounting. Add a Windows oracle
    for thread identity, descriptions, access rights and lifetime queries.

  • Add native QueueUserAPC, ReadFileEx, and WriteFileEx, with per-thread
    callback queues, issuing-thread completion delivery for regular files and
    named pipes, cancellation, EOF, and ignored overlapped event handles.
    Add a real Windows oracle for APC ordering, duplicated thread handles,
    alertable waits, file completion routines, and cancelled pipe reads.

  • Add native AddDllDirectory, RemoveDllDirectory, SetDllDirectoryW,
    and GetDllDirectoryW, with per-process search configuration and a real
    PE DLL search oracle covering cookies, directory buffers, duplicate names,
    recursive dependencies, and invalid flags.

  • Add everyday Powe...

Read more