πŸ“¦+πŸ¦€=β™₯️ A tool that helps wrap binary releases for easy distribution

Overview


Rustwrap

A tool that helps wrap binary releases for easy distribution. Currently supporting:

  • npm - npm install -g your-tool will make your binary your-tool available via the CLI. rustwrap creates the necessary binary packages and root package with a Node.js shim that delegates running to your platform-specific bin.
  • Homebrew - creates a recipe and saves or publishes it to your tap.

Download

For macOS:

brew tap rusty-ferris-club/tap && brew install rustwrap

Through cargo:

cargo install rustwrap

Or cargo-binstall for installing binaries (save compilation time):

cargo binstall rustwrap

Otherwise, grab a release from releases and run rustwrap --help:

Getting started

Build a single rustwrap.yaml, and describe which releases you have an where to get them per platform, and your provider blocks.

Use __VERSION__ when you want the actual version replaced.

targets:
  - platform: win32
    arch: x64
    url_template: https://github.com/rusty-ferris-club/recon/releases/download/v__VERSION__/recon-x86_64-windows.zip
  - platform: linux
    arch: x64
    url_template: https://github.com/rusty-ferris-club/recon/releases/download/v__VERSION__/recon-x86_64-linux.tar.xz
  - platform: darwin
    arch: x64
    url_template: https://github.com/rusty-ferris-club/recon/releases/download/v__VERSION__/recon-x86_64-macos.tar.xz
  - platform: darwin
    arch: x64
    url_template: https://github.com/rusty-ferris-club/recon/releases/download/v__VERSION__/recon-aarch64-macos.tar.xz

# provider: npm
# both recon-root.json and recon-sub.json paths are relative to working folder
npm:
  publish: false # dont publish to npm, just generate the packages on disk
  org: "@recontools"
  name: recon
  root: 
    name: recon-tool
    manifest: rustwrap/fixtures/config/recon-root.json
    readme: rustwrap/fixtures/config/README.md
  sub: 
    manifest: rustwrap/fixtures/config/recon-sub.json
    readme: rustwrap/fixtures/config/README.md

# provider: homebrew
brew:
  name: recon
  publish: true # push an update commit to the tap repo
  tap: jondot/homebrew-tap
  recipe_fname: recon.rb
  recipe_template: |
    class Recon < Formula
      desc "recon"
      homepage "http://www.example.com"
      url "__URL__"
      version "__VERSION__"
      sha256 "__SHA__"

      def install
        bin.install "recon"
      end
    end

With your rustwrap.yaml and relevant files in the current working folder, run:

$ rustwrap --tag 0.6.0

The --tag value replaces the __VERSION__ value.

About

This tool was inspired in part by the Rome toolchain and infrastructure built for releasing Rome on npm.

I gave it some generic abilities (downloading releases independently) and tweaks, and extended it with a Homebrew provider, something which I needed for a while now.

  • It can be used for any self-contained binary produced in any language, not just Rust
  • Accepting PRs for more providers

Contributing

We are accepting PRs. Feel free to submit PRs.

To all Contributors - you make this happen, thanks!

License

Copyright (c) 2022 @jondot. See LICENSE for further details.

You might also like...
An easy-to-use, high-performance Interledger implementation written in Rust

Interledger implementation in Rust πŸ’Έ Requirements All crates require Rust 2018 edition and are tested on the following channels: stable Connecting to

An easy-to-use generic trainer for Linux, written in Rust.
An easy-to-use generic trainer for Linux, written in Rust.

An easy-to-use generic trainer for Linux written in Rust, with basic memory hacking features. Use it for your games or applications where needed, there is also the tuxtraind daemon which will probe for processes and apply matching trainers automatically.

Usable, easy and safe pure-Rust crypto

orion About Orion is a cryptography library written in pure Rust. It aims to provide easy and usable crypto while trying to minimize the use of unsafe

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native

πŸ–Œ egui: an easy-to-use GUI in pure Rust πŸ‘‰ Click to run the web demo πŸ‘ˆ egui is a simple, fast, and highly portable immediate mode GUI library for Ru

Easy Fiat-Shamirization using Meow
Easy Fiat-Shamirization using Meow

Magikitten A system for making public-coin protocols non-interactive, using Meow. This library is also heavily inspired by Merlin, and provides a simi

Simple rust library for NFT metadata w/ an easy server

NFT Server Simple rust lib for NFT Metadata, and a basic axum server for delivering it $ cargo build $ cargo clippy $ cargo run --bin example Usage I

Simple node and rust script to achieve an easy to use bridge between rust and node.js

Node-Rust Bridge Simple rust and node.js script to achieve a bridge between them. Only 1 bridge can be initialized per rust program. But node.js can h

Easy setup for Edge host.
Easy setup for Edge host.

Pod's Edge Staking GUI (beta) Features Easily setup your Edge host with a GUI (Graphical User Interface). Uses the device token staking method. Has no

a simple rust service for Scheduling commands execution on time basis, an easy alternative to cron

Tasker A Simple crate which provides a service and a configuration API for genrating commands based tasks ,on time basis. Installation build from sour

Comments
  • add `skip_decompress` to target definition in YAML, and avoid decompression if `true`

    add `skip_decompress` to target definition in YAML, and avoid decompression if `true`

    example (notice the win32 link):

    targets:
        - platform: win32
          arch: x64
          url_template: https://github.com/lycheeverse/lychee/releases/download/v0.10.3/lychee-v0.10.3-windows-x86_64.exe
        - platform: linux
          arch: x64
          url_template: https://github.com/lycheeverse/lychee/releases/download/v0.10.3/lychee-v0.10.3-x86_64-unknown-linux-gnu.tar.gz
        # - platform: darwin
        #   arch: x64
        #   url_template: https://github.com/lycheeverse/lychee/releases/download/v0.10.3/lychee-v0.10.3-macos-x86_64.dmg
        - platform: darwin
          arch: x64
          url_template: https://github.com/lycheeverse/lychee/releases/download/v0.10.3/lychee-v0.10.3-aarch64-unknown-linux-gnu.tar.gz
    

    Auto-detecting if decompress needed is also OK.

    enhancement 
    opened by jondot 0
Owner
Rusty Ferris Club
A builders club for people who love building stuff in Rust. We're also helping and teaching each other.
Rusty Ferris Club
An easy-to-use CLI tool to recover files from zfs snapshots

zfs-undelete an easy-to-use cli tool to recover files from zfs snapshots Usage Use zfs-undelete <file-to-restore>. Works for file and folders. By defa

null 9 Dec 15, 2022
Simple to use CLI tool that makes encryption easy! Written in Rust.

?? eme: Encryption Made Easy an extremely simple AES-256 encryption tool written in Rust Usage: # To encrypt: eme --encrypt secret.png # To decrypt: e

null 5 Jan 3, 2023
A simple self-contained CLI tool that makes it easy to efficiently encrypt/decrypt your files.

cryptic A simple self-contained CLI tool that makes it easy to efficiently encrypt/decrypt your files. Contents Features Building Usage License Featur

Arthur Ivanets 5 May 2, 2023
Experimental binary transparency for pacman with sigstore and rekor

pacman-bintrans This is an experimental implementation of binary transparency for pacman, the Arch Linux package manager. This project was originally

null 80 Dec 23, 2022
A Rust binary for file encryption to multiple participants.

Kaspa-miner A Rust binary for file encryption to multiple participants. Installation From Sources With Rust's package manager cargo, you can install k

Elichai Turkel 31 Dec 30, 2022
Rust implementation of the Binary Canonical Serialization (BCS) format

Binary Canonical Serialization (BCS) BCS (formerly "Libra Canonical Serialization" or LCS) is a serialization format developed in the context of the D

Zefchain Labs 4 Nov 13, 2022
Multi-tenant Nix Binary Cache

Attic Attic is a self-hostable Nix Binary Cache server backed by an S3-compatible storage provider. It has support for global deduplication and garbag

Zhaofeng Li 189 Feb 5, 2023
Usable, easy and safe pure-Rust crypto

orion About Orion is a cryptography library written in pure Rust. It aims to provide easy and usable crypto while trying to minimize the use of unsafe

Johannes 476 Dec 22, 2022
Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.

Themis provides strong, usable cryptography for busy people General purpose cryptographic library for storage and messaging for iOS (Swift, Obj-C), An

Cossack Labs 1.6k Dec 30, 2022
A modern, portable, easy to use crypto library.

Sodium is a new, easy-to-use software library for encryption, decryption, signatures, password hashing and more. It is a portable, cross-compilable, i

Frank Denis 10.7k Jan 3, 2023