Socket
Socket
Sign inDemoInstall

@metaplex-foundation/rustbin

Package Overview
Dependencies
Maintainers
10
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metaplex-foundation/rustbin

Synchronizes a Rust binary version with the related Rust crate


Version published
Weekly downloads
8.9K
increased by10.56%
Maintainers
10
Weekly downloads
 
Created
Source

rustbin Build Lint and Test Rustbin

Synchronizes a Rust binary version with the related Rust crate.

Anchor Example

Prepare Config

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

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

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.

LICENSE

Apache-2.0

Keywords

FAQs

Package last updated on 11 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc