Crates.io | binst |
lib.rs | binst |
version | 0.1.6 |
source | src |
created_at | 2021-05-13 00:58:30.101871 |
updated_at | 2023-03-16 21:10:16.918166 |
description | binst's goal is to provide a simple way to publish and install Rust based binaries without the need of cargo-install and the complexity of OS dependent package managers |
homepage | https://github.com/jeremychone/rust-binst |
repository | https://github.com/jeremychone/rust-binst |
max_upload_size | |
id | 396756 |
size | 125,477 |
Under Development - Working but still early.
binst
's goal is to provide a simple and decentralize mechanism to publish and install [rust based] binaries. The command line is repository location agnostic, although we might provide one repository at binst .io at some point. At this point, only support s3
protocol to publish, and s3
and http/https
for install.
In short:
binst publish -r s3://my_bucket-com/repo
(will publish the --release
previously built)binst install my_cool_lib -r https://my_bucket.com/repo
(assuming you made your bucket a website).
binst install my_cool_lib -r s3://my_bucket-com/repo
binst update my_cool_lib
and it will get updated if a new one was deployed in the stream (main by default)pre
, default is main
.OS Support - For now, supports x64 mac and x64 linux gnu. ARM Mac / Linux coming soon. Windows, pull request welcome.
Binary install on the development and install machines
## On Linux x86 (Intel/AMD)
curl -O https://repo.binst.io/binst/x86_64-unknown-linux-gnu/stable/binst.tar.gz && \
tar -xvf binst.tar.gz && ./binst self && \
echo 'source "$HOME/.binst/env"' >> ~/.bashrc && source "$HOME/.binst/env"
## On Mac Apple Silicon
curl -O https://repo.binst.io/binst/arm64-apple-darwin/stable/binst.tar.gz && \
tar -xvf binst.tar.gz && ./binst self && \
echo '\nsource "$HOME/.binst/env"' >> ~/.zshenv && source "$HOME/.binst/env"
## On Mac x86 (Intel/AMD)
curl -O https://repo.binst.io/binst/x86_64-apple-darwin/stable/binst.tar.gz && \
tar -xvf binst.tar.gz && ./binst self && \
echo '\nsource "$HOME/.binst/env"' >> ~/.zshenv && source "$HOME/.binst/env"
Note on AWS Linux - When using older instances, you must (and should anyway) update openssl to 1.1 or above with
sudo yum install openssl11
(per default Rust's requirement).
On the development machine, can use cargo install as well
cargo install binst
Note: You need to have a AWS S3 repository and the credential either as environment variables or as a aws profile
Publishing a binary from dev machine.
## Publish to S3
# Note: publish the --release, with the Cargo.tml version.
binst publish -r s3://my_repo_bucket/repo_root --profile my_aws_profile
# Or with the default AWS credential env variables set
binst publish -r s3://my_repo_bucket/repo_root
Installing the binary published
# Install the latest stable version published (the one in the info.toml)
binst install cool_cli -r s3://my_repo_bucket/my_repo
# install from a http/https URL (assuming http domain map to the s3 bucket above)
binst install cool_cli -r https://my_repo_bucket.com/my_repo
# then, you can run the cool_cli (assuming ~/.binst/bin/ has been added to the PATH)
cool_cli ....
Note: For now a
binst install ...
will reinstall the binary for the latest version. It won't do any semver comparison.
Not for end users - binst
is not for end-users, but for developers and the technical community.
Not a package manager - Dumb is the new smart; use real package manager if dumb is not enough.
No Windows support (yet) - Sorry, I do not have Windows around. Pull request welcome, though.
No central repository - Decentralized first, but eventually will profile one on binst .io for the popular command-line tools.
Simple repo layout - There can be only one. Also, only .tar.gz format.
Few protocols - S3 to publish, https/s3 to install. Git planned.
binst
gets the S3 credentials the following way.
--profile profile-name
is defined, it will take the standards AWSBINST_...
environment variables
BINST_REPO_AWS_KEY_ID
BINST_REPO_AWS_KEY_SECRET
BINST_REPO_AWS_REGION
BINST_REPO_AWS_ENDPOINT
(optional, useful when using minio as object store)AWS_...
environment variables
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION
AWS_ENDPOINT
(optional, useful when using minio as object store)- repo_base
- cool_cli/
- x86_64-unknown-linux-gnu/
- main/ # for main semver, like 0.1.1
- latest.toml # latest
- 0.1.1/
- cool_cli.toml # package.version = 0.1.1
- cool_cli.tar.gz
- 0.1.0/
- cool_cli.toml # package.version = 0.1.0
- cool_cli.tar.gz
- rc/ # when semver has a -..pre.. (take the alpha only).
- latest.toml
- 0.1.0-rc.1/
- cool_cli.toml # package.version = 0.1.0-rc.1
- cool_cli.tar.gz
- ~/.binst/
- env # sh file to source to set the ~/.binst/bin in the PATH
- bin/ # symblink dir. Should be in the PATH
crate_name -> ../packages/crate_name/0.1.3/upacked/crate_name
- packages/
- crate_name/
- 0.1.3/
- install.toml # (version and repo of the download. Will be user for the future 'binst update' command)
- crate_name.tar.gz # (downloaded package)
- unpacked/ # unpacked tar.gz containing the executable crate_name
x86_64-pc-windows-msvc
https://doc.rust-lang.org/nightly/rustc/platform-support.html