Giter Club home page Giter Club logo

jq-darwin's Introduction

JQ for Darwin

Build jq for various Apple platforms. This repository hosts scripts to conveniently build jq for all of the numerous supported Apple Platforms and generate XCFrameworks for the jq library. The compressed frameworks are hosted as release assets.

Requirements

Xcode 15 or newer is required to build for all the platforms declared in the build.sh script. Aditionally, Autotools is required for building jq and oniguruma. Other dependencies are part of Xcode's command line tools.

Building

Before building, make sure that all required dependencies are installed and the command line tools for your desired version of Xcode have been selected.

To install automake, and autoconf using Homebrew:

brew install automake autoconf

To select Xcode command line tools:

sudo xcode-select -s /path/to/Xcode.app

Now, you can build by executing build.sh:

./build.sh

The build script will compile static libraries and executables for jq and oniguruma (a dependency of jq) for all the supported targets. The generated static libraries are then used to create a single XCFramework for jq and oniguruma.

All the build artifacts are available under the Products directory once the script finishes building.

jq

Currently this repository targets the jq-1.7.1 release tag of the jq repository on GitHub, which is the latest stable release.

Generated XCFramework

The build.sh script generates an XCFramework for jq and the associated version of oniguruma. To allow interoperability with Swift, these frameworks expose Cjq and Coniguruma clang modules for the respective static library. Both the XCFrameworks are required for using the jq library. To use an XCFramework, you can link the framework in your Xcode project, or add it as a binary target to your Swift Package manifest.

XCFramework Releases

A zip archive of the XCFrameworks for jq and the associated version of oniguruma are available for download as part of the release assets. The release info should contain the SHA-1 hashes of both the zip archives and the version of Xcode and other build tools used to generate the framework.

Verifying Authenticity of Builds

Since the frameworks are being distributed as compiled binaries, it becomes crucial to verify the authenticity of the builds. The authenticity of the builds can be verified by checking out the release tag for the particular release and running the build.sh script. When the script finishes running, it prints out the SHA-1 hashes of the zip archives of the newly built XCFrameworks. This hash must match the hash of the respective zip archives on the release page, and hash of the downloaded zip archive obtained by running:

shasum -a 1 path/to/framework.xcframework.zip

NOTE: To generate an identical build for verifying the authenticity make sure that same versions of the Xcode and other build tools are used. Please follow the instructions provided in the README for the particular release that you want to verify. The instructions may vary between releases.

Supported Targets

The build.sh file supports the following targets:

Platform Deployment Target Architecture Variant
๐Ÿ“ฑ iOS 9.0 armv7 iPhone/iPad
๐Ÿ“ฑ iOS 9.0 armv7s iPhone/iPad
๐Ÿ“ฑ iOS 9.0 arm64 iPhone/iPad
๐Ÿ“ฑ iOS 9.0 i386 Simulator
๐Ÿ“ฑ iOS 9.0 x86_64 Simulator
๐Ÿ“ฑ iOS 9.0 arm64 Simulator
๐Ÿ“ฑ iOS 13.0 x86_64 Catalyst
๐Ÿ“ฑ iOS 13.0 arm64 Catalyst
๐Ÿ–ฅ macOS 10.10 x86_64 Mac
๐Ÿ–ฅ macOS 11.0 arm64 Mac
โŒš๏ธ watchOS 2.0 armv7k Watch
โŒš๏ธ watchOS 5.0 arm64_32 Watch
โŒš๏ธ watchOS 2.0 x86_64 Simulator
โŒš๏ธ watchOS 2.0 arm64 Simulator
๐Ÿ“บ tvOS 9.0 arm64 TV
๐Ÿ“บ tvOS 9.0 x86_64 Simulator
๐Ÿ“บ tvOS 9.0 arm64 Simulator
๐Ÿ•ถ๏ธ visionOS 1.0 arm64 Vision Pro
๐Ÿ•ถ๏ธ visionOS 1.0 x86_64 Simulator
๐Ÿ•ถ๏ธ visionOS 1.0 arm64 Simulator

License

The code in this repository is licensed under the MIT license. The zip archive of the XCFrameworks for jq and oniguruma are licensed under their respective licenses. A copy of the COPYING license file is shipped with both the frameworks.

jq-darwin's People

Contributors

sameesunkaria avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.