Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2026 Thomas Mittet
Copyright (c) 2026 Huddly AS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

A modern, cross platform C# binding for [libusb](https://libusb.info/).
Copyright (c) 2026 Thomas Mittet, project URL: https://github.com/tmittet/UsbDotNet/.
Copyright (c) 2026 Huddly AS, fork URL: https://github.com/Huddly/UsbDotNet/.

NuGet packages: https://www.nuget.org/packages/UsbDotNet/.
This is the Huddly fork of UsbDotNet. It bundles a modified build of libusb for Windows, see
[Third-Party libraries](#third-party-libraries) and `/THIRD-PARTY-NOTICES.md`.

NuGet packages: https://www.nuget.org/packages/Huddly.UsbDotNet/.

## License

Expand All @@ -17,11 +21,17 @@ included in compliance with LGPL.
- The libusb-1.0 library is bundled with this project for convenience
- libusb-1.0 is part of the [libusb project](https://github.com/libusb/) and is licensed under
[LGPL-2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)
- The `win-x64` and `win-arm64` binaries are a **modified build** of libusb-1.0, built from the
[Huddly libusb fork](https://github.com/Huddly/libusb); the exact branch, commit and CI build
are listed in `/THIRD-PARTY-NOTICES.md`
- All other bundled binaries are unmodified builds of upstream libusb
- Precompiled binaries are included in `/src/UsbDotNet.LibUsbNative/runtimes/`
- You may replace the binaries with any LGPL-compliant versions

### Licensing Notes
- The full LGPL-2.1 license text is provided in `/LICENSE.libusb`
- Third-party notices, including the source location of the modified libusb build, are
provided in `/THIRD-PARTY-NOTICES.md`
- Use of libusb doesn’t imply endorsement from the libusb project
- If you modify or redistribute the libusb binaries, you must follow the
[LGPL-2.1 terms](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)
51 changes: 51 additions & 0 deletions THIRD-PARTY-NOTICES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Third-Party Notices

This is the Huddly fork of UsbDotNet. The original UsbDotNet project by Thomas Mittet is
licensed under the MIT License: https://github.com/tmittet/UsbDotNet. The C# code in this
repository remains under the MIT License (see `LICENSE`).

## libusb-1.0 (LGPL-2.1)

The `Huddly.UsbDotNet.LibUsbNative` package bundles precompiled binaries of
[libusb-1.0](https://libusb.info/), which is licensed under the GNU Lesser General Public
License, version 2.1 (LGPL-2.1). The full license text is provided in `LICENSE.libusb`
(packaged as `licenses/LICENSE.libusb`). Use of libusb does not imply endorsement by the
libusb project.

### Modified build (Windows x64 and arm64)

The `win-x64` and `win-arm64` binaries are a **modified** build of libusb-1.0, built from the
Huddly fork of libusb:

- Repository: https://github.com/Huddly/libusb
- Branch: `libusb-v1.0.30`
- Commit: `2ab95bfd7f9cdfb129e867e2240001772a0f3a8e`
- Reported libusb version: `1.0.30.62037`

The modifications are limited to the Windows (WinUSB) backend and are documented as change
notices in the fork's commit history, as required by LGPL-2.1 section 2(b). Compared to
upstream libusb 1.0.30, the fork opens the WinUSB device handle lazily on first use instead of
on `libusb_open`, and no longer clears endpoint data before an interface claim has succeeded.

The binaries were built from the commit above by the "Build libusb (Windows)" GitHub Actions
workflow in this repository (`.github/workflows/build_libusb_windows.yml`):
https://github.com/Huddly/UsbDotNet/actions/runs/36128292544

### Unmodified builds

All other bundled binaries (`win-x86`, `osx-x64`, `osx-arm64`, `maccatalyst-x64`,
`maccatalyst-arm64`) are unmodified builds of upstream libusb:
https://github.com/libusb/libusb. No binary is bundled for Linux; the system-installed
libusb-1.0 is used.

### Replacing the binaries

libusb is dynamically linked. The binaries are located in
`src/UsbDotNet.LibUsbNative/runtimes/<rid>/native/` in this repository and under
`runtimes/<rid>/native/` in the NuGet package. You may replace them with any compatible
libusb-1.0 build, as permitted by LGPL-2.1 section 6.

### Maintenance

Update the branch, commit, version and workflow run above on every release that changes the
bundled libusb binaries.
1 change: 1 addition & 0 deletions UsbDotNet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
LICENSE.libusb = LICENSE.libusb
nuget.config = nuget.config
README.md = README.md
THIRD-PARTY-NOTICES.md = THIRD-PARTY-NOTICES.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{9D23C15C-5ADC-4D24-9206-198A26113684}"
Expand Down
3 changes: 3 additions & 0 deletions src/UsbDotNet.LibUsbNative/UsbDotNet.LibUsbNative.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<None Include="..\..\LICENSE.libusb" Pack="true" PackagePath="licenses/">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\THIRD-PARTY-NOTICES.md" Pack="true" PackagePath="">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<!-- linux-arm64 - NOTE: Rely on included libusb (apt-get) on Linux -->
<!-- linux-x64 - NOTE: Rely on included libusb (apt-get) on Linux -->
<!-- maccatalyst-arm64 - NOTE: Not tested -->
Expand Down
Loading