# @metaplex-foundation/rustbin

> Synchronizes a Rust binary version with the related Rust crate

Latest version **0.3.5** (published 2023-08-11) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @metaplex-foundation/rustbin
pnpm add @metaplex-foundation/rustbin
yarn add @metaplex-foundation/rustbin
bun add @metaplex-foundation/rustbin
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.3.5 |
| Published | 2023-08-11 |
| First published | 2022-04-22 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 35.4 KB |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Thorsten Lorenz |
| Maintainers | danenbm, nhanphan, blockiosaurus, 0x_febo, svc01-metaplex, samuelvanderwaal, brandontulsi, lorisleiva, thlorenz, austbotm |
| Keywords | rust, install, binary, cli, version |

## Links

- npm: https://www.npmjs.com/package/@metaplex-foundation/rustbin
- Repository: git@github.com:metaplex-foundation/rustbin
- npm.io page: https://npm.io/package/@metaplex-foundation/rustbin

## Dependencies (4)

- [toml](https://npm.io/package/toml.md) ^3.0.0
- [debug](https://npm.io/package/debug.md) ^4.3.3
- [semver](https://npm.io/package/semver.md) ^7.3.7
- [text-table](https://npm.io/package/text-table.md) ^0.2.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.3.5 (latest) — 2023-08-11
- 0.3.4 — 2023-08-11
- 0.3.3 — 2023-08-11
- 0.3.2 — 2023-08-11
- 0.3.1 — 2022-04-23
- 0.3.0 — 2022-04-23
- 0.2.0 — 2022-04-23
- 0.1.0 — 2022-04-22

## README

# rustbin [![Build Lint and Test Rustbin](https://github.com/metaplex-foundation/rustbin/actions/workflows/rustbin.yml/badge.svg)](https://github.com/metaplex-foundation/rustbin/actions/workflows/rustbin.yml)

Synchronizes a Rust binary version with the related Rust crate.

## Anchor Example

### Prepare Config

```js
const path = require('path');
const rootDir = path.join(__dirname, 'cargo');
const cargoToml = path.join(__dirname, '..', '..', 'program', 'Cargo.toml');

const config = {
  rootDir,
  binaryName: 'anchor',
  binaryCrateName: 'anchor-cli',
  libName: 'anchor-lang',
  dryRun: false,
  cargoToml,
};
```

### Checking Versions

```js
const { rustbinCheck } = require('@metaplex-foundation/rustbin');
const { satisfies, libVersion, binVersion } = await rustbinCheck({
console.log(`${binVersion} %s ${libVersion}`, satisfies ? 'satisfies' : 'does not satisfy');
```

### Check and Install If Needed

```js
const { rustbinMatch, confirmAutoMessageConsole } = require('@metaplex-foundation/rustbin');
const { cmd, fullPathToBinary } = await rustbinMatch(config, confirmAutoMessageConsole);
console.log(`${fullPathToBinary} installed via ${cmd}`);
```

## API

Please consult the full API [here](https://metaplex-foundation.github.io/rustbin/docs/).

## LICENSE

Apache-2.0

---
_Source: https://npm.io/package/@metaplex-foundation/rustbin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
