Punic is a remote caching CLI built for Apple's .xcframework

Overview

Punic

elephant

Punic is a remote caching CLI built for Carthage that exclusively supports Apple's .xcframeworks.

Features

  • Easy remote caching via AWS S3
  • Easy CI/CD integration
  • Support for versioned dependencies

Please give us a star if you find this CLI useful!

Installation

brew tap summerlabs/homebrew-punic
brew install punic

AWS Credentials

Make sure you have your AWS config and credentials setup.

They are keys that Punic uses to upload your frameworks into AWS and will be automatically setup for you when you run aws configure.

Here is an example after you run the setup successfully.

~/.aws/config

[default]
region = us-west-1
output = json

~/.aws/credentials

[default]
aws_access_key_id = {SOME_ACCESS_KEY_ID}
aws_secret_access_key = {SOME_SECRET_KEY}

Documentation

Punfile

Punic looks for a Punfile to determine which dependencies to download as well as configuring the path of your local cache.

Example Punfile

# Configure Punic
configuration:
  # save dependencies into this directory
  # ie. //some-remote-bucket/1.0.1/Alamofire/Alamofire.xcframework
  # 
  prefix: 1.0.1
  # local cache location
  local: ~/Library/Caches/Punic
  # aws bucket location
  s3Bucket: some-remote-bucket
  
# Search your Carthage/Build directory for these .xcframeworks
dependencies:
# single framework definition
- AlamoFire:
  - name: AlamoFire
# multiple frameworks definition sometimes created by one library
- CocoaLumberjack:
  - name: CocoaLumberjack
  - name: CocoaLumberjackSwift
  - name: CocoaAsyncSocket

Commands

After building your .xcframeworks using

carthage update --use-xcframeworks

They will be located in the top level Carthage/Build directory.

Download .xcframeworks

punic download

Upload .xcframeworks

punic upload

Carthage-less Support

Punic was built with Carthage in mind as it essentially builds frameworks for consumption. However, Punic by itself is simply a remote caching tool that simply uploads and downloads a directory of frameworks in isolation. Presumably, the download path can point to anything. Right now it points to the project's Carthage/Build folder but later on will be configurable to point to any folder. Right now, it works very well with Carthage and should be used as such.

Developer Support

Punic is a new framework that was made to help our team achieve remote caching with Apple's latest .xcframework change. If you find any issues using the CLI, don't hesitate to open one up to help us bug splash.

For all you Rust developers, feel free to contribute to this framework and help us grow the CLI.

Comments
  • Adds support to select the default aws Region

    Adds support to select the default aws Region

    This PR addresses Issue 7 (https://github.com/summerlabs/punic/issues/7)

    Further Documentation https://rusoto.github.io/rusoto/rusoto_core/region/enum.Region.html

    Changes Made Updated s3.rs to use the Region::default() instead of the hardcoded uswest1.

    Improvements This will provide greater flexibility for users and also ensure that the region can be tweaked externally via the aws config file. This addresses the issue we were seeing where files were not being uploaded to AWS S3.

    Please can we merge this and release a new version 0.8?

    Thank you to all involved in this project it is going to be extremely useful for our team :)

    opened by miscampbell 1
  • AWS Region is hardcoded to USWest1

    AWS Region is hardcoded to USWest1

    Issue The current implementation of s3.rs is hardcoded to the region uswest1. This is an issue for myself as our s3 bucket is configured to use a different region.

    Proposed Fix We will retrieve the region as set inside the aws configuration file and retrieve the correct region to be set.

    opened by miscampbell 1
  • upload version files?

    upload version files?

    Hi, currently only xcframework is being uploaded/downloaded without their respective .version files. Suppose I'am working on my local machine with dependency version 1 which I downloaded from AWS at some point in the past, then I merged master/develop which which has dependency of version 2 to my local, I can't easily verify that my current dependency in carthage/build has correct version. Previously with rome, we would match the version in version files with cartfile.resolved.

    opened by ivanrein 0
  • Installation requires Xcode 12.5

    Installation requires Xcode 12.5

    First, thanks for the great tool. I've been using Rome for a while but as it's still not supporting XCFrameworks it's great to see some other tools are arising. I've noticed that to install the tool it requires Xcode 12.5 command line tools. Is it possible to support a lower version too? XCFrameworks are around for a while so might not every team is able to support the latest yet. (We specifically in Xcode 12.3)

    opened by iamszabo 3
  • Versioning does not work if not in the x.y.z format

    Versioning does not work if not in the x.y.z format

    Given the following content in the Punfile

    - FooBar:
      - name: FooBar
        version: 1.2
    

    you get an error:

    thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/punfile.rs:85:109
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    

    That only works if your dependency has the x.y.z version formatting

    - FooBar:
      - name: FooBar
        version: 1.2.0
    

    I think version should be a free-form string.

    Also that does not make sense to have to specify the version number in the Punfile, it should be automatically done somehow. I know there's no strong adherence with Carthage, so it should do it with some kind of hashing of the .xcframework.

    opened by nomadplanet 3
Releases(1.1.1)
A CLI tool for CIs and build scripts, making file system based caching easy and correct (locking, eviction, etc.)

FS Dir Cache A CLI tool for CIs and build scripts, making file system based caching easy and correct (locking, eviction, etc.) When working on build s

Dawid Ciężarkiewicz 5 Aug 29, 2023
Implemented reverse-engineered signature algorithm to successfully register with Apple's caching server.

View as English 项目描述 本项目通过逆向得到苹果缓存服务器的签名算法,并可以成功注册缓存服务。算法分为两种运行模式。 运行模式 直接运行(x64): 效率较高,但只支持64位CPU。已测试可运行在Windows/Linux/macOS上。 模拟器运行: 兼容性极高,支持所有CPU架构

null 6 Oct 27, 2023
The fastest memoizing and caching Python library written in Rust.

Cachebox Cachebox is a Python library (written in Rust) that provides memoizations and cache implementions with different cache replecement policies.

Ali 3 Feb 28, 2024
Call is an easy-to-use command tools for remote development.

Call is an easy-to-use command tools for remote development. It helps you to build remote development easily and elegant. It can work with makefile and justfile.

null 21 Dec 14, 2022
Cross-platform binary shims with optional remote fetching.

chim Cross-platform binary shims with optional remote fetching. Quickstart (make an automatic fetching node.js wrapper) Install chim: (see docs for al

Jeff Dickey 10 Jan 1, 2023
A bit like tee, a bit like script, but all with a fake tty. Lets you remote control and watch a process

teetty teetty is a wrapper binary to execute a command in a pty while providing remote control facilities. This allows logging the stdout of a process

Armin Ronacher 259 Jan 3, 2023
Mirroring remote repositories to s3 storage, with atomic updates and periodic garbage collection.

rsync-sjtug WIP: This project is still under development, and is not ready for production use. rsync-sjtug is an open-source project designed to provi

SJTUG 57 Feb 22, 2023
Fast turbo remote cache server written in Rust

Fast turbo remote cache server written in Rust. if you are using turbo and you want to have a self hosted remote cache server this is for you.

Salama Ashoush 10 May 24, 2023
Real-time CLI level meter built in Rust.

Meter This is a very simple command line utility written in Rust for measuring the gain of a microphone. It displays the values in dBFS. This is usefu

Chris Burgess 16 Sep 8, 2022
Nostr CLI client built with Rust

Nostr CLI client built with Rust Encrypted chat inside Nostr leaks metadata of who talks to who. This small CLI app implements a "public inbox," which

Vincent Liao 10 Dec 19, 2022
A lightweight focus CLI tool built with Rust

A lightweight pomodoro focus tool with cross-platform desktop notifications on Linux, MacOS and Windows.

Dominic Hains 2 Oct 24, 2022
A TUI for your todos built in Rust with full CLI support.

todui TUI Features This app allows for almost anythig you would need when dealing with todos: Create, edit, and delete tasks Add links to tasks Add du

Daniel Melchor 14 Apr 1, 2023
A CLI tool to get help with CLI tools 🐙

A CLI tool to get help with CLI tools ?? halp aims to help find the correct arguments for command-line tools by checking the predefined list of common

Orhun Parmaksız 566 Apr 16, 2023
🔭 Search Dash.app from Neovim with Telescope. Built with Rust 🦀 and Lua

Dash.nvim Query Dash.app within Neovim with a Telescope picker! The theme used in the recording is lighthaus.nvim. Note: Dash is a Mac-only app, so yo

Mat Jones 193 Dec 28, 2022
nhdl - a command-line doujinshi downloader client built in rust!

nhdl nhdl - a command-line doujinshi downloader client built in rust! goals fast and asynchronous doujinshi downloader, supporting various doujinshi s

Lumine 2 Dec 23, 2022
pt is a simple tabbed terminal built with gtk-rs and vte-rs.

pt pt is a simple tabbed terminal built with gtk-rs and vte-rs. how to build You need to have gtk3 glib vte pcre2 dev packages installed on your syste

Alexander Polakov 5 Dec 8, 2021
A blazingly fast Insertion Sort and Quick Sort visualizer built with Rust and WASM.

sortysort A blazingly fast Insertion Sort and Quick Sort visualizer built with Rust and WASM. Try it in your browser from here Testing locally cargo r

null 3 Jan 28, 2022
global state management for dioxus built on the concept of atoms. currently under 🏗

Fermi: A global state management solution for Dioxus, inspired by Recoil.Js Fermi provides primitives for managing global state in Dioxus applications

Dioxus 15 Feb 12, 2022
a universal meta-transliterator that can decipher arbitrary encoding schemas, built in pure Rust

transliterati a universal meta-transliterator that can decipher arbitrary encoding schemas, built in pure Rust what does it do? You give it this: Барл

Catherine Koshka 7 Dec 21, 2022