LibtorrentSharp 0.1.0-alpha
This is a prerelease version of LibtorrentSharp.
dotnet add package LibtorrentSharp --version 0.1.0-alpha
NuGet\Install-Package LibtorrentSharp -Version 0.1.0-alpha
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LibtorrentSharp" Version="0.1.0-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LibtorrentSharp" Version="0.1.0-alpha" />
<PackageReference Include="LibtorrentSharp" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LibtorrentSharp --version 0.1.0-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LibtorrentSharp, 0.1.0-alpha"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LibtorrentSharp@0.1.0-alpha
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LibtorrentSharp&version=0.1.0-alpha&prerelease
#tool nuget:?package=LibtorrentSharp&version=0.1.0-alpha&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
LibtorrentSharp
A .NET binding for libtorrent-rasterbar, the C++ BitTorrent library that powers qBittorrent, Deluge, and many other clients.
Status: early access / alpha. The public API surface is stabilizing toward a v0.1 release. Expect breaking changes between pre-release versions.
Architecture
LibtorrentSharp/— managed C# library (net8.0, AnyCPU). P/Invoke into a native shared library (lts.dllon Windows). Idiomatic .NET surface: properIDisposable, value types for hashes,IAsyncEnumerable<Alert>for the alert pump.LibtorrentSharp.Native/— C++ shared library exposing a C ABI (extern "C") over libtorrent. Built via CMake + vcpkg. Windows x64 + arm64 in the first pass; Linux and macOS follow.
LibtorrentSharp wraps the existing C++ libtorrent — it is not a C# reimplementation of the BitTorrent protocol.
Goals
- Full-fidelity coverage of libtorrent's public client-facing surface (
session,torrent_handle, alerts, status/peer/tracker structs, add_torrent_params, hash types, magnet parsing). - Zero consumer-project coupling. The binding has no dependency on any specific client.
- NativeAOT-friendly. P/Invoke boundary chosen over C++/CLI for this reason.
Non-goals
- Plugin API (
session_plugin,torrent_plugin) — C++ extension points don't translate cleanly to managed code. - Raw bencode/bdecode — use
BencodeNETinstead. - Cross-platform in v0.1. Windows x64 + arm64 first.
License
Apache-2.0. Derived from csdl by Albie Spriddell. See NOTICE for attribution.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-alpha | 79 | 5/1/2026 |