Docs.rs
  • svm-rs-0.5.16
    • svm-rs 0.5.16
    • Permalink
    • Docs.rs crate page
    • MIT OR Apache-2.0
    • Links
    • Homepage
    • Repository
    • crates.io
    • Source
    • Owners
    • mattsse
    • gakonst
    • DaniPopes
    • github:alloy-rs:core
    • Dependencies
      • anyhow ^1.0 normal optional
      • clap ^4 normal optional
      • console ^0.15 normal optional
      • dialoguer ^0.11 normal optional
      • dirs ^6.0 normal
      • fs4 ^0.13 normal
      • const-hex ^1.10 normal
      • indicatif ^0.17 normal optional
      • itertools ^0.14 normal optional
      • reqwest ^0.12 normal
      • semver ^1 normal
      • serde ^1 normal
      • serde_json ^1 normal
      • sha2 ^0.10 normal
      • tempfile ^3.10 normal
      • thiserror >=1.0, <3.0 normal
      • tokio ^1 normal optional
      • url ^2.5 normal
      • rand ^0.9 dev
      • serial_test ^3.0 dev
      • tempfile ^3.10 dev
      • tokio ^1.36 dev
      • vergen ^8 build optional
      • zip ^2 normal
    • Versions
    • 41.3% of the crate is documented
  • Platform
    • i686-unknown-linux-gnu
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate svm

logo

svm0.5.16

  • All Items

Sections

  • Solidity Compiler Version Manager
    • Install
    • Usage

Crate Items

  • Structs
  • Enums
  • Functions

Crates

  • svm

Crate svm

Source
Expand description

§Solidity Compiler Version Manager

crates.io docs.rs build status

This crate provides a cross-platform support for managing Solidity compiler versions.

§Install

From crates.io:

cargo install svm-rs

Or from the repository:

cargo install --locked --git https://github.com/alloy-rs/svm-rs/

§Usage

Solc version manager

Usage: svm <COMMAND>

Commands:
  help     Print this message or the help of the given subcommand(s)
  install  Install Solc versions
  list     List all Solc versions
  remove   Remove a Solc version, or "all" to remove all versions
  use      Set a Solc version as the global default

Options:
  -h, --help     Print help
  -V, --version  Print version

Structs§

BuildInfo
Build info contains the SHA256 checksum of a solc binary.
Releases
Defines the struct that the JSON-formatted release list can be deserialized into.

Enums§

Platform
Types of supported platforms.
SvmError
Error types from the svm_lib crate.

Functions§

all_releases
Fetch all releases available for the provided platform.
all_versions
Fetches the list of all the available versions of Solc. The list is platform dependent, so different versions can be found for macosx vs linux.
data_dir
Returns the path to the default data directory.
get_global_version
Reads the currently set global version for Solc. Returns None if none has yet been set.
global_version_path
Returns the path to the global version file.
install
Installs the provided version of Solc in the machine.
installed_versions
Reads the list of Solc versions that have been installed in the machine. The version list is sorted in ascending order.
platform
Read the current machine’s platform.
remove_version
Removes the provided version of Solc from the machine.
set_global_version
Sets the provided version as the global version for Solc.
setup_data_dir
Setup SVM home directory.
unset_global_version
Unset the global version. This should be done if all versions are removed.
version_binary
Derive path to a specific Solc version’s binary file.
version_path
Returns the path to a specific Solc version’s directory.

Results

Settings
Help

Type "SolcVmError" not found. Showing results for closest type name "svmerror" instead.

No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.
    method
    svm::SvmError::source
    &SvmError -> Option<&Error>
    method
    svm::SvmError::fmt
    &SvmError, &mut Formatter -> Result
    method
    svm::SvmError::from
    PathPersistError -> SvmError
    function
    svm::setup_data_dir
    -> Result<(), SvmError>
    Setup SVM home directory.
    function
    svm::unset_global_version
    -> Result<(), SvmError>
    Unset the global version. This should be done if all …
    function
    svm::all_releases
    Platform -> Result<Releases, SvmError>
    Fetch all releases available for the provided platform.
    function
    svm::all_versions
    -> Result<Vec<Version>, SvmError>
    Fetches the list of all the available versions of Solc. …
    function
    svm::get_global_version
    -> Result<Option<Version>, SvmError>
    Reads the currently set global version for Solc. Returns …
    function
    svm::installed_versions
    -> Result<Vec<Version>, SvmError>
    Reads the list of Solc versions that have been installed …
    function
    svm::install
    &Version -> Result<PathBuf, SvmError>
    Installs the provided version of Solc in the machine.
    function
    svm::remove_version
    &Version -> Result<(), SvmError>
    Removes the provided version of Solc from the machine.
    function
    svm::set_global_version
    &Version -> Result<(), SvmError>
    Sets the provided version as the global version for Solc.