NuGet packaging pipeline for UltrafastSecp256k1 — ultra high-performance secp256k1 elliptic curve cryptography library.
Analogous to eynhaender/getboost.
| Tool | Purpose | Check |
|---|---|---|
| Visual Studio 2026 with "Desktop development with C++" | vc145 compiler | VS Installer |
| CMake ≥ 3.25 | Build system | cmake --version |
| Git | Clone source | git --version |
NuGet CLI (nuget.exe on PATH) |
Create package | nuget help |
| .NET 8 SDK | Build C# packager | dotnet --version |
# Full run: clone source, build, stage, pack
.\build.ps1 -Pack
# Source already cloned; rebuild and repack
.\build.ps1 -SkipClone -Pack
# Staging already complete; repack only
.\build.ps1 -SkipClone -SkipBuild -Pack -Version 4.1.0
# Override version (e.g. for a pre-release tag)
.\build.ps1 -Version 4.1.0-rc1 -Pack-
build.ps1 clones
shrec/UltrafastSecp256k1(branchdev) and runs CMake with the Visual Studio 2026 generator for every combination of:- Architecture: x64 (the library uses x64-only intrinsics; Win32 is not supported)
- Link type: static, shared
- Configuration: Release, Debug
Each variant is installed to
_staging/{arch}/{linktype}/{config}/. -
builder/ (C# .NET 8) scans the staging tree, generates a
.targetsfile for MSBuild integration and a.nuspec, then callsnuget.exe pack.
UltrafastSecp256k1-vc145.<version>.nupkg contains:
build/native/
UltrafastSecp256k1-vc145.targets ← auto-imported by NuGet restore
include/secp256k1/ ← public headers
include/ufsecp/
lib/native/
x64/{Release,Debug}/{static,shared}/
Add a local feed and restore:
nuget sources add -Name local -Source C:\path\to\getUltrafastSecp256k1
nuget install UltrafastSecp256k1-vc145 -Version 4.1.0Or add a nuget.config to your solution pointing at the local directory.
Link type is Static by default (required by libbitcoin). To opt into shared
linking, set this property before importing the NuGet targets:
<!-- in your .vcxproj or a .props file that it imports -->
<PropertyGroup>
<UltrafastSecp256k1LinkType>Shared</UltrafastSecp256k1LinkType>
</PropertyGroup>Open test/test.sln in Visual Studio 2026, restore NuGet packages, and build.
The project links a minimal program against the installed package.