Skip to content

SindarinSDK/sindarin-pkg-libs

Repository files navigation

Sindarin Libs

Pre-built static libraries for Sindarin projects. Libraries are built via GitHub Actions and distributed as release assets.

Quick Install

Linux/macOS:

curl -fsSL https://raw.githubusercontent.com/SindarinSDK/sindarin-pkg-libs/main/scripts/install.sh | bash

Windows (PowerShell):

irm https://raw.githubusercontent.com/SindarinSDK/sindarin-pkg-libs/main/scripts/install.ps1 | iex

These commands download and extract the latest libraries to ./libs/{platform} (e.g., ./libs/linux, ./libs/darwin, ./libs/windows).

Supported Platforms

  • Linux (x64-linux)
  • macOS (x64-osx / arm64-osx)
  • Windows (x64-mingw-static)

Included Libraries

Library Description
zlib Compression library
yyjson High-performance JSON parser
json-c JSON parsing and serialization (C)
libxml2 XML parsing library
libyaml YAML parsing library
OpenSSL SSL/TLS cryptography
ngtcp2 QUIC protocol implementation
libssh SSH library
libssh2 SSH2 protocol library
libgit2 Git implementation
curl HTTP client library
http-parser HTTP message parser
pcre2 Perl-compatible regular expressions
sindarin-template Sindarin template library

Extracted Directory Structure

After installation, the libs directory contains platform-specific subdirectories:

libs/
├── linux/        # Linux libraries (when installed on Linux)
│   ├── lib/
│   ├── include/
│   └── share/
├── darwin/       # Darwin/macOS libraries (when installed on macOS)
│   ├── lib/
│   ├── include/
│   └── share/
└── windows/      # Windows libraries (when installed on Windows)
    ├── lib/
    ├── include/
    └── share/

Usage in CMake

# Determine platform
if(WIN32)
    set(SINDARIN_LIBS_PLATFORM "windows")
elseif(APPLE)
    set(SINDARIN_LIBS_PLATFORM "darwin")
else()
    set(SINDARIN_LIBS_PLATFORM "linux")
endif()

# Set paths
set(SINDARIN_LIBS_DIR "${CMAKE_SOURCE_DIR}/libs/${SINDARIN_LIBS_PLATFORM}")
set(SINDARIN_LIBS_INCLUDE "${SINDARIN_LIBS_DIR}/include")
set(SINDARIN_LIBS_LIB "${SINDARIN_LIBS_DIR}/lib")

# Add include path
include_directories(${SINDARIN_LIBS_INCLUDE})

# Link libraries
target_link_libraries(your_target
    "${SINDARIN_LIBS_LIB}/libcurl.a"
    "${SINDARIN_LIBS_LIB}/libgit2.a"
    "${SINDARIN_LIBS_LIB}/libssh.a"
    "${SINDARIN_LIBS_LIB}/libssl.a"
    "${SINDARIN_LIBS_LIB}/libcrypto.a"
    "${SINDARIN_LIBS_LIB}/libz.a"
    # ... other libraries as needed
)

Building Locally

Prerequisites

  • CMake 3.20+
  • Ninja
  • Git
  • Python 3
  • Platform-specific:
    • Linux: GCC, build-essential
    • macOS: Xcode Command Line Tools
    • Windows: LLVM-MinGW

Build Commands

# Setup vcpkg and install dependencies
make setup

# Build libraries to libs/{platform}/
make build

# Clean build artifacts
make clean

# Full rebuild
make rebuild

# Show configuration
make info

GitHub Actions

The workflow builds libraries on all three platforms and uploads them as release assets.

Creating a Release

  1. Create a new release on GitHub with a version tag (e.g., v1.0.0)
  2. The workflow automatically builds all platforms and attaches the archives to the release

Alternatively, trigger manually via the Actions UI with a tag name.

Updating Dependencies

  1. Edit vcpkg.json to add/modify dependencies
  2. Create a new release to trigger builds
  3. Archives will be attached to the release

License

This package's build system is licensed under the MIT License.

Individual bundled libraries retain their original licenses. See THIRD-PARTY.md for the complete attribution document including license types, copyright holders, and compliance notes.

Summary of bundled library licenses:

License Libraries
MIT yyjson, json-c, libxml2, libyaml, curl, http-parser, ngtcp2, utf8proc, sindarin-template
Apache 2.0 OpenSSL, libmongoc, libbson
BSD 3-Clause libssh2, pcre2, zstd (dual-licensed, BSD selected)
zlib License zlib
PostgreSQL License libpq, libpgcommon, libpgport, libpgtypes, libecpg
Public Domain SQLite
LGPL 2.1 libssh, libmariadb
GPL 2.0 + Linking Exception libgit2

About

Prebuilt binaries for all platforms (linux/windows/macos)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors