Quickstart¶
Start in an existing project¶
LSW detects CMake, Meson, Cargo, Zig, Make, and .NET projects.
- Go to the project directory.
- Run
lsw setup. It detects the project, creates a default environment, and writeslsw.toml. - Run
lsw build. It cross-compiles tobuild/<name>.exe, a real PE binary. - Run
lsw run. It builds and runs the binary through Wine. - Run
lsw check. It validates the full pipeline: configuration, environment, build, Wine execution, DLL resolution, and PE hardening.
lsw setup
lsw build
lsw run
lsw check
lsw package
Start from nothing¶
- Run
lsw init hello. It scaffoldslsw.tomland a CMake hello project. - Go into the new directory.
- Run
lsw setup, thenlsw check.
lsw init hello && cd hello
lsw setup
lsw check
lsw init --template <name> selects the scaffold:
| Template | Result |
|---|---|
console |
C console program (default) |
cpp |
C++ console program |
gui |
WinMain window program |
dll |
Shared library |
service |
Windows service skeleton |
Complete example projects are in
examples/. Copy
one, or run it in place with lsw setup && lsw check. The examples
gitignore lsw.lock because they float with the LSW version. In your own
project, commit both lsw.toml and lsw.lock.
The next commands¶
lsw test- run the test suite under Wine.lsw inspectandlsw audit- examine the built PE binary.lsw doctor- examine the host setup.lsw watch- build again on each source change.lsw verify --native- run the binaries on a real Windows host.
For more environments, other architectures, and the MSVC ABI, use
lsw env create and lsw use directly. lsw setup is a shortcut over the
same machinery.
The command map¶
Getting started: setup init doctor check
Build / run: build run exec test shell watch clean
Analysis: inspect audit exports deps diff size strings sbom crash
Compatibility: compat compat-query trace
Debugging: debug dap
Ship: package sign verify ci
Environments: env use registry ps kill service sdk toolchain path
Languages: rust dotnet
Tooling: ide plugin daemon config explain completions man install
See the command reference for all flags. Most
report commands accept --format json. When a command fails with an
LSW#### code, run lsw explain <code>, or see
troubleshooting.