Skip to content

Miniscule cross-platform eventing, networking & crypto for async applications

License

Notifications You must be signed in to change notification settings

roomitz/uSockets-deb

 
 

Repository files navigation

libusockets - Debian Package

This repository maintains the Debian packaging for µSockets (libusockets), a minimal cross-platform eventing, networking and cryptography library.

Repository Structure

This is a mixed repository containing both upstream sources and Debian packaging:

libusockets-debian/
├── debian/                      # Debian packaging files
├── .github/                     # GitHub Actions workflows
├── src/                         # Upstream source code
│   ├── crypto/                  # Cryptography implementations (OpenSSL)
│   ├── eventing/                # Event loop backends (epoll, kqueue, libuv, GCD, io_uring)
│   ├── networking/              # Network I/O implementations
│   ├── io_uring/                # io_uring-specific implementation
│   ├── internal/                # Internal headers and data structures
│   └── libusockets.h            # Main public header file
├── examples/                    # Usage examples (echo server, HTTP server, etc.)
├── tests/                       # Test suite (QUIC, SSL, peer verification)
├── misc/                        # Miscellaneous files (SSL certificates, documentation)
├── Makefile                     # Build configuration
├── LICENSE                      # Apache License 2.0
├── module.modulemap             # Swift module map
└── README.md                    # This file

Upstream Documentation

For upstream µSockets documentation, see:

About libusockets

µSockets is a miniscule cross-platform eventing, networking and cryptography library featuring:

  • Minimal footprint: Designed for efficiency and low memory usage
  • Cross-platform: Supports Linux (epoll, io_uring), macOS/BSD (kqueue), Windows, and more
  • Multiple backends: Flexible event loop implementation (libuv, GCD, io_uring)
  • Networking: Async socket operations, SSL/TLS support, QUIC/HTTP3 (experimental)
  • Performance: Built with link-time optimization for optimal performance
  • C API: Clean and simple async operations interface

Quick Start - Building the Package

Prerequisites

sudo apt-get install debhelper-compat build-essential \
  libssl-dev libuv1-dev pkg-config

Build from Source

# Extract the source package
dpkg-source -x libusockets_*.dsc

cd libusockets-*/

# Build the package
dpkg-buildpackage -b -us -uc

The resulting .deb file will be in the parent directory.

Install the Package

# Install the package
sudo dpkg -i libusockets-dev_*.deb

# Install missing dependencies if needed
sudo apt-get install -f

Debian Package Information

  • Package name: libusockets-dev
  • Current version: 0.8.8-1
  • Maintainer: Ruslan Dautov
  • Build dependencies: debhelper-compat (= 13), libssl-dev, libuv1-dev, pkg-config
  • Upstream: https://github.com/uNetworking/uSockets

Build Configuration

Build Flags

  • WITH_LIBUV=1: Enable libuv backend (default)
  • WITH_OPENSSL=1: Enable OpenSSL support (default)
  • WITH_IO_URING=0: io_uring support not enabled by default
  • LIBUS_NO_SSL: Can be set to disable SSL (not recommended)

Debian Packaging Files

Key packaging files and their purposes:

  • debian/control: Package metadata and dependencies
  • debian/rules: Build instructions and configuration
  • debian/copyright: License and copyright information
  • debian/libusockets-dev.install: Files to include in the package
  • debian/pkg-config/libusockets.pc: pkg-config metadata
  • debian/tests/: Autopkgtest test suite
  • debian/changelog: Version history
  • debian/watch: auto tracking of new upstream releases from GitHub

Testing

Package Installation Test

# Verify installation
lintian -i ../libusockets-dev_*.changes

# Check for installed files
dpkg -L libusockets-dev | head -20

# Verify pkg-config works
pkg-config --list-all | grep libusockets
pkg-config --cflags --libs libusockets

Automated Tests

Run autopkgtest tests:

autopkgtest ../libusockets-dev_*.deb -- qemu -o

Manual Tests

Compile and run example programs:

# Compile echo server example (requires source)
gcc examples/echo_server.c $(pkg-config --cflags --libs libusockets) -o echo_server
./echo_server

Contributing to Packaging

If you want to contribute to the Debian packaging:

  1. Fork this repository
  2. Make changes in the debian/ directory
  3. Update debian/changelog with your changes
  4. Test with debuild or dpkg-buildpackage
  5. Submit a pull request

For contributing to upstream µSockets, visit https://github.com/uNetworking/uSockets

License

  • Upstream sources: Apache License 2.0 (see LICENSE)
  • Debian packaging: Apache License 2.0

This library includes optional support for:

  • OpenSSL: Various open-source licenses (packaged separately)
  • libuv: MIT License
  • BoringSSL: Apache License 2.0 (optional)
  • LSQUIC: BSD License (optional, for QUIC/HTTP3)

See the debian/copyright file for complete license information.

Useful Commands

# Check package policy compliance
lintian -i ../libusockets-dev_*.changes

# Build source package only
dpkg-buildpackage -S -us -uc

# Build binary package
dpkg-buildpackage -b -us -uc

# Build source and binary
dpkg-buildpackage -us -uc

# Clean build artifacts
dpkg-buildpackage -t clean

# List installed files
dpkg -L libusockets-dev

# Verify library symbols
nm /usr/lib/*/libusockets.a | grep ' T '

# Check pkg-config info
pkg-config libusockets --modversion --cflags --libs

Links

Support and Contact

For issues related to:


Last updated: 2025-11-23 Maintainer: Ruslan Dautov Repository: Debian packaging for µSockets

About

Miniscule cross-platform eventing, networking & crypto for async applications

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 90.3%
  • C++ 8.0%
  • Makefile 1.2%
  • Shell 0.5%