Repository navigation
Releases: Open-Tech-Foundation/Win-Runner
Release list
v0.2.0
Added
-
cmd.exe built-ins
dir(/b,/s,/a[:attributes],/o[:order],
with Windows' listing layout and summaries),ren/rename(wildcard
templates such asren *.txt *.bak),move, andpath. -
find.exe(/V /C /N /I, files or standard input),sort.exe(/R,
/+n,/O), andmore.comin System32, socmd /c "dir | find ..."
and friends work. A newcmd_builtinsWindows 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, andObjectNameInformation
giving a file's NT path), andGetConsoleTitleA/W.SetConsoleTitleW
now keeps the title and shows it in the terminal (OSC 0). -
wpkg installs npm tarballs (
.tgz/.tar.gzpackage 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 pythoninstalls python.org's full NuGet distribution
instead of the embeddable one, sosite,exit(),venv, andpip
work. Running it needed:- CRT
_wgetcwd/_getcwdandiswctype;PathCchRemoveFileSpec;
SetHandleCount;SetWaitableTimerEx. ConvertStringSecurityDescriptorToSecurityDescriptorW(SDDL owner,
group and DACL), which CPython uses for private directories.CLSIDFromString,IIDFromString,StringFromGUID2,UuidCreate,
UuidCreateSequential, andSHLWAPI!StrStrW/StrStrIW.CertCreateCertificateContext, collection stores
(CERT_STORE_PROV_COLLECTION,CertAddStoreToCollection) and store
providers named by string ("Memory"), as pip's truststore and
CPython'sssluse them.- A real
FormatMessageA/W: system messages for common Win32, Winsock
and certificate codes,FROM_STRINGwith%1inserts, and
FORMAT_MESSAGE_ALLOCATE_BUFFER(Python'sWinErrortext was garbage). SetFileInformationByHandle(FileBasicInfo)for times and attributes
(CPython'sos.chmodon a descriptor).
Oracle cases cover the new version, string-search, attribute-list and
FileBasicInfo behavior.
- CRT
-
GetVersionExA/W, andGetVersion/GetVersionExreport 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. Thenative_startup
oracle checks the unmanifested case. -
ScrollConsoleScreenBufferWfor full-width vertical moves (mapped to the
terminal's scroll region), so Python 3.14's new REPL (pyrepl) runs; other
moves reportERROR_NOT_SUPPORTED. -
The
native_startuporacle 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,GetActiveProcessorCountand
GetMaximumProcessorCount(one processor group), which the .NET 10
CoreCLR calls at startup. -
where.exein System32: finds files in the current directory and along
PATHwithPATHEXTextensions (/Q,/F,/R), exiting 1 with
Windows' message when a pattern matches nothing. -
Get-ChildItemon registry paths (HKLM:\…,HKCU:\…) lists subkeys
under aHive:header and yields key objects withNameand
PSChildNamein value position;Get-Contenton a registry path
reports the provider's error instead of a bad file path. -
$_in acatchblock 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.comadds its trailing empty line only for piped input. -
Matched against Windows: cmd's
pathprintsPATH=(null)when PATH is
unset;find.exeexits 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(andecho) output each
argument and element on its own line,Write-Hostseparates 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.exeand batch/script files their arguments the legacy way, as
its default$PSNativeCommandArgumentPassing(Windows) does: embedded
quotes as typed, socmd /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 asint, so TLS in Python failed withWSAEFAULT. -
InitializeProcThreadAttributeListaccepts an empty list, which
CPython'ssubprocessalways builds. -
_open_osfhandlegives descriptors to device handles, soopen("nul")
works instead of failing withEMFILE. -
CreateFileMappingWandSetFileInformationByHandlefollow
DuplicateHandlecopies to their file (CPython'smmap). -
Enumerating a collection store walks every member store's
certificates;CertGetEnhancedKeyUsageuses the real
CERT_FIND_EXT_ONLY(2) andCERT_FIND_PROP_ONLY(4) flags. -
FindFirstFileWapplies Windows' DOS pattern rules:*.*matches every
name (directories without a dot included),name.*matchesname, and
*.matches names without an extension plus.and.., so
programs listing with*.*(CPython'sos.listdir) see every entry.
Thefs_pathsoracle covers it. -
The
apc_iooracle accepts both outcomes Windows documents for an
overlapped read at end of file (an immediateERROR_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-Objecttables use PowerShell's GroupInfo layout (Count 5 wide,
Name 25, longer names end in…);Format-Tablealigns number columns
right;Out-Stringmakes one string ending in a newline (a blank line in
output, one string when assigned or used in"$(...)"). -
The
powershell_expressionsoracle 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-Commandwith a plain name returns the command that would run (an
alias or built-in before a program, else the first program onPATH). -
1 + '1'converts the string to the left operand's number type. -
Objects from
ConvertFrom-Jsonand hashtable literals keep their key
spellings in JSON and table output. -
PowerShell utility cmdlets:
Get-Date(with .NET-Formatstrings),
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), andGet-ItemPropertyValue.
Get-Commandaccepts several names (Get-Command cmd,tar). -
A PowerShell expression engine for statements and assignments:
arithmetic (1+1,7/2,%,kb/mbsuffixes, hex), string and array
repetition and concatenation, arrays (1,2,3,@(...), ranges
1..5, negative indexes), hashtable literals with entries, comparison
operators (withc/iforms and array filtering),-like,-match,
-replace,-split,-join,-contains/-in,-is/-as, logical
and bitwise operators,-fformatting (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 andwinrun --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 leadingparam(...)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.exein System32, as Windows ships it:/PIDand/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 withtaskkill /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...
v0.1.0
Added
-
Release packaging for GitHub:
release.tomland the generated
.github/workflows/release.ymlbuildtarget/release/winrunonmain,
publish a checksummed archive with build provenance attestation, and use
the curated changelog notes. -
CertAddEncodedCertificateToStorewith theCERT_STORE_ADD_*
dispositions, for memory and system stores (additions stay with the open
store; a certificate matches another with identical encoded bytes). -
WSADuplicateSocketWfor the calling process withWSASocketWfrom its
protocol info (Rust'sTcpStream::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_stat64i32family,_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_osfhandleunder their api-ms-win-crt names._readends at a
broken pipe and failures seterrnoand_doserrno(_dosmaperr). PathCchSkipRoot,PathCchCombineEx,PathCchCanonicalizeEx,
VerifyVersionInfoA,LCMapStringEx,inet_ntop,
WSAStringToAddressW, and theDisconnectExandTransmitFile
(WSAEOPNOTSUPP) extension functions.- Overlapped
WSARecv/WSASendthat cannot finish at once pend (also on
non-blocking sockets) and complete through the completion port;
CancelIoExandclosesocketcancel them (and pendingAcceptEx) with
ERROR_OPERATION_ABORTED; pending operations mark their OVERLAPPED
STATUS_PENDING;GetOverlappedResultreads socket results. RegisterWaitForSingleObjectwaits on any waitable object, and a
one-shot wait stays registered untilUnregisterWait(Ex).
The overlapped_sockets oracle probe records the proactor behavior on
Windows; native_startup records committing memory without a reservation.
- CRT:
-
wpkg installfor 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;
SHGetKnownFolderPathfor the standard known folders;
GetPerformanceInfo/K32GetPerformanceInfo; and
RtlGetNtVersionNumbers. The native_startup oracle probe records each on
Windows. -
tar.exein System32, as Windows 10+ ships it (bsdtar's command line):
-c/-x/-t(also the bundledtar xzfform),-f(with-for
standard streams),-C,-z/-j/-a/--format zip,-v,-k,-O,
--strip-components,--excludeand member patterns. Reading detects
gzip, bzip2 and zip by content; members naming..are refused. -
curl.exein 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_castdown and
across single, multiple and virtual inheritance, throwingstd::bad_cast
for a failed reference cast),__RTCastToVoidand__RTtypeid(throwing
std::bad_typeidfor a null object). Thecxx_ehoracle covers them. -
GetProcessIdfor the current process and child process handles. The
native_startuporacle compares it withCreateProcessW'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(__exceptfilters,__finally). Rust programs
built forx86_64-pc-windows-msvcnow unwind panics:catch_unwind,
#[should_panic], failingassert!s andexpects in test harnesses, and
thread panics behave as on Windows instead of stopping the process. New
cxx_ehandrust_unwindWindows oracles check both. -
Native Win32 mutexes (
CreateMutexA/W,CreateMutexExA/W,
OpenMutexA/W,ReleaseMutex) with owner recursion, names, waits
(including wait-all) and handle duplication, plusBCryptGenRandom,
CertOpenSystemStoreA/W,CertGetIntendedKeyUsage,CompareFileTime,
GetFileTime,GetFileAttributesA,MoveFileExA, and the CRT's
strtoll/_strtoi64,_byteswap_*,isxdigitand_difftime64. The
official Windows curl (wpkg install curl) now downloads over HTTPS
natively. A newsync_cryptoWindows oracle checks these APIs. -
PowerShell values:
X -split PandX -join Sin assignments, and quoted
patterns containing.in conditions ($v -like "*-canary.*"),$_bound
to the error insidecatch, 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 nativewpkgcurl, createsbunx.exe, adds it to
the userPATH, 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 guestPATHwithPATHEXT,.ps1files inline, output
captured by$(...)and assignments,$LASTEXITCODE(exit codes as signed
32-bit numbers), and standard error merged into output by2>&1or
dropped by2>$null.Write-Warningand
Write-Errorwrite to standard error (Write-Errorstops under
$ErrorActionPreference = 'Stop'). -
PowerShell
Add-Type -MemberDefinitiondeclares[DllImport]functions
answered by built-in implementations (IsProcessorFeaturePresentfrom the
host CPU,SendMessageTimeoutbroadcasts), 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
!xover 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|Ignoreswallows a command's error,mkdirandNew-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-ItemandTest-PathonHKLM:/HKCU:paths,Get-/New-/
Set-/Remove-ItemProperty, andRegistryKeyobjects withOpenSubKey,
CreateSubKey,GetValue(withDoNotExpandEnvironmentNames),
GetValueKind,SetValue,DeleteValueand name listings, backed by the
guest hives. Commands work asifconditions,(expr).Memberis a
statement,[Type]::Memberreads registry enums and[IntPtr]::Zero, and
a missing object member reads as$null. A newpowershell_scripting.ps1
Windows oracle checks these against real PowerShell, and both oracle
runners now run everytests/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, andreturnoutputs 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. AddGetCurrentThreadStackLimitsusing 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, andGetThreadDescription, 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, andWriteFileEx, 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,
andGetDllDirectoryW, 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...