Expand description
§Solidity Compiler Version Manager
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§
- Build
Info - 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§
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.