Need Private Modules

    @metaplex-foundation/rustbin
    TypeScript icon, indicating that this package has built-in type declarations

    0.3.1 • Public • Published

    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

    Install

    npm i @metaplex-foundation/rustbin

    DownloadsWeekly Downloads

    6,890

    Version

    0.3.1

    License

    Apache-2.0

    Unpacked Size

    34.9 kB

    Total Files

    26

    Last publish

    Collaborators

    • blockiosaurus
    • 0x_febo
    • stegabob
    • svc01-metaplex
    • samuelvanderwaal
    • brandontulsi
    • lorisleiva
    • roederw
    • thlorenz
    • austbotm