-
Notifications
You must be signed in to change notification settings - Fork 0
Build
github-actions[bot] edited this page Jul 16, 2026
·
1 revision
把 wknet 编成可链接的静态库 wknetlib.lib,并接到你的驱动工程。
| 组件 | 要求 |
|---|---|
| 操作系统 | Windows 10/11 或 Windows Server 2016+ |
| Visual Studio | 2022+(含 C++ 桌面与驱动开发组件) |
| Windows SDK | 10.0.19041.0 或更高 |
| WDK | 与 SDK 版本匹配 |
使用 pwsh,不要用 powershell。
# 全部配置 x 全部内核 ABI(x64、ARM64)
pwsh -NoLogo -NoProfile -File . oolsuild-lib.ps1
# 单 ABI
pwsh -NoLogo -NoProfile -File . oolsuild-lib.ps1 -Configuration Debug -Platform x64
# 或直接 msbuild
msbuild wknet.sln /m /restore /p:Configuration=Release /p:Platform=x64产物路径:
src/wknetlib/<Platform>/<Configuration>/wknetlib.lib
例如 src/wknetlib/x64/Release/wknetlib.lib。
- 包含总头:
#include <wknet/Wknet.h>- 项目属性:
| 项 | 值 |
|---|---|
| 附加包含目录 |
$(SolutionDir)include(或你的仓库 include) |
| 附加库目录 | 指向含 wknetlib.lib 的目录 |
| 附加依赖项 | wknetlib.lib |
- 把
wknetlib工程加入解决方案并设为依赖,保证先编库。
Wknet.h 只聚合公共 http / websocket / crypto / codec 头,不包含内部 session、transport 或 engine 头。
Build wknet into the static library wknetlib.lib and link it from your driver project.
| Component | Requirement |
|---|---|
| OS | Windows 10/11 or Windows Server 2016+ |
| Visual Studio | 2022+ (C++ desktop + driver workloads) |
| Windows SDK | 10.0.19041.0 or newer |
| WDK | Matching the SDK version |
Use pwsh, not powershell.
# All configurations × kernel ABIs (x64, ARM64)
pwsh -NoLogo -NoProfile -File .\tools\build-lib.ps1
# Single ABI
pwsh -NoLogo -NoProfile -File .\tools\build-lib.ps1 -Configuration Debug -Platform x64
# Or msbuild directly
msbuild wknet.sln /m /restore /p:Configuration=Release /p:Platform=x64Output path:
src/wknetlib/<Platform>/<Configuration>/wknetlib.lib
Example: src/wknetlib/x64/Release/wknetlib.lib.
- Include the umbrella header:
#include <wknet/Wknet.h>- Project settings:
| Setting | Value |
|---|---|
| Additional include directories |
$(SolutionDir)include (or your repo include) |
| Additional library directories | Directory that contains wknetlib.lib
|
| Additional dependencies | wknetlib.lib |
- Add the
wknetlibproject to the solution and set a project dependency so the library builds first.
Wknet.h only aggregates the public http / websocket / crypto / codec headers. It does not include internal session, transport, or engine headers.
- First request — minimal GET / POST
- Integration notes — IRQL, lifetime, unload
- Contributor test matrix: Build & test
-
开始使用 / Get Started
-
概念与行为 / Concepts
-
协议指南 / Protocols
-
API 参考 / API Reference
-
贡献与项目 / Contribute