Skip to content

fontist/ffi-libarchive-binary

Repository files navigation

Binaries for ffi-libarchive

Gem Version Build Status

Purpose

Contains pre-compiled and install-time-compiled binaries for ffi-libarchive.

Installation

Add this line to your application’s Gemfile:

gem "ffi-libarchive-binary"

And then execute:

$ bundle install

Or install it yourself as:

$ gem install ffi-libarchive-binary

Usage

Require the gem and use calls from ffi-libarchive.

require "ffi-libarchive-binary"

path = File.expand_path('file.pkg', __dir__)
flags = Archive::EXTRACT_PERM
reader = Archive::Reader.open_filename(path)

reader.each_entry do |entry|
  reader.extract(entry, flags.to_i)
end

reader.close

Development

We are following Sandi Metz’s Rules for this gem, you can read the description of the rules here. All new code should follow these rules. If you make changes in a pre-existing file that violates these rules you should fix the violations as part of your contribution.

Contributing

First, thank you for contributing! We love pull requests from everyone. By participating in this project, you hereby grant Ribose Inc. the right to grant or transfer an unlimited number of non exclusive licenses or sub-licenses to third parties, under the copyright covering the contribution to use the contribution by all means.

Here are a few technical guidelines to follow:

  1. Open an issue to discuss a new feature.

  2. Write tests to support your new feature.

  3. Make sure the entire test suite passes locally and on CI.

  4. Open a Pull Request.

  5. Squash your commits after receiving feedback.

  6. Party!

License

This gem is distributed with a BSD 3-Clause license.

This gem is developed, maintained and funded by Ribose Inc.

Supported platforms

The following platforms are officially tested and supported:

Platform Architecture Ruby Versions Status

Windows 2022

x86_64

2.7, 3.0, 3.1, 3.2, 3.3, 3.4

✅ Supported

Windows 2025

x86_64

2.7, 3.0, 3.1, 3.2, 3.3, 3.4

✅ Supported

macOS 15

ARM64 (Apple Silicon)

2.7, 3.0, 3.1, 3.2, 3.3, 3.4

✅ Supported

macOS 15 Large

x86_64 (Intel)

2.7, 3.0, 3.1, 3.2, 3.3, 3.4

✅ Supported

macOS 26

ARM64 (Apple Silicon)

2.7, 3.0, 3.1, 3.2, 3.3, 3.4

✅ Supported

Ubuntu 24.04

x86_64 (glibc)

2.7, 3.0, 3.1, 3.2, 3.3, 3.4

✅ Supported

Ubuntu 22.04

x86_64 (glibc)

2.7, 3.0, 3.1, 3.2, 3.3, 3.4

✅ Supported

Alpine Linux

x86_64 (musl)

2.7, 3.0, 3.1, 3.2, 3.3, 3.4

✅ Supported

Ubuntu 24.04

ARM64 (glibc)

2.7, 3.0, 3.1, 3.2, 3.3, 3.4

✅ Supported

Ubuntu 22.04

ARM64 (glibc)

2.7, 3.0, 3.1, 3.2, 3.3, 3.4

✅ Supported

Alpine Linux

ARM64 (musl)

2.7, 3.0, 3.1, 3.2, 3.3, 3.4

✅ Supported

Note
The gem provides pre-compiled binaries for 10 platforms. Separate binaries are provided for glibc-based (gnu) and musl-based Linux distributions to ensure compatibility. Windows ARM64 support is planned for future releases pending resolution of OpenSSL build system compatibility issues with MSYS2 CLANGARM64.

OpenSSL compiler target strategy

The gem explicitly sets OpenSSL compiler targets to ensure correct assembly code generation:

Platform Compiler Target Reason

Windows x64

mingw64

Explicit x86_64 assembly selection

Linux x86_64 (gnu/musl)

Auto-detect

Native toolchain works correctly

Linux ARM64 (gnu/musl)

Auto-detect

Native toolchain works correctly

macOS ARM64

Auto-detect

Native toolchain works correctly

macOS x64

Auto-detect

Native toolchain works correctly

Note
Windows platforms require explicit compiler targets because OpenSSL’s auto-detection does not reliably select the correct target on Windows. Linux musl and glibc variants use the same OpenSSL configuration with auto-detection, as the toolchain correctly identifies the target.

Build requirements

Windows

Windows x64

For building from source on Windows x64, you need:

  • Ruby 2.7 or higher with DevKit

  • MinGW-w64 x86_64 toolchain

  • MSYS2 (recommended) or equivalent Unix-like environment

macOS

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 5