Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: library #116

Merged
merged 7 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 116 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@ license = "MIT OR Apache-2.0"
readme = "./README.md"
repository = "https://github.com/alloy-rs/svm-rs"
homepage = "https://github.com/alloy-rs/svm-rs"

[workspace.dependencies]
svm = { package = "svm-rs", version = "0.3.5", path = "crates/svm-rs", default-features = false }

hex = { package = "const-hex", version = "1.10" }
semver = "1"
serde = "1"
serde_json = "1"
reqwest = { version = "0.11", default-features = false }
33 changes: 13 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[<img alt="docs.rs" src="https://img.shields.io/docsrs/svm-rs/latest?color=66c2a5&label=docs-rs&style=for-the-badge" height="20">](https://docs.rs/svm-rs/latest/svm_lib/)
[<img alt="build status" src="https://img.shields.io/github/actions/workflow/status/roynalnaruto/svm-rs/ci.yml?branch=master&style=for-the-badge" height="20">](https://github.com/roynalnaruto/svm-rs/actions?query=branch%3Amaster)

### Install
## Install

From [crates.io](https://crates.io):

Expand All @@ -18,28 +18,21 @@ Or from the repository:
cargo install --locked --git https://github.com/alloy-rs/svm-rs/
```

### Usage

- List available versions

```sh
svm list
```

- Install a version
## Usage

```sh
svm install <version>
```
Solc version manager

- Use an installed version
Usage: svm <COMMAND>

```sh
svm use <version>
```
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

- Remove an installed version

```sh
svm remove <version>
Options:
-h, --help Print help
-V, --version Print version
```
15 changes: 6 additions & 9 deletions crates/svm-builds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,17 @@ repository.workspace = true
homepage.workspace = true

[build-dependencies]
svm = { package = "svm-rs", path = "../svm-rs", version = "0.3.5", default-features = false, features = [
"blocking",
"rustls",
] }
svm = { workspace = true, default-features = false, features = ["blocking", "rustls"] }

build_const = "0.2"
hex = "0.4"
semver = { version = "1.0", features = ["serde"] }
serde_json = "1.0"
hex.workspace = true
semver = { workspace = true, features = ["serde"] }
serde_json.workspace = true

[dependencies]
build_const = "0.2"
hex = "0.4"
semver = { version = "1.0", features = ["serde"] }
hex.workspace = true
semver = { workspace = true, features = ["serde"] }

[features]
# helper feature to block network access
Expand Down
1 change: 1 addition & 0 deletions crates/svm-builds/README.md
2 changes: 1 addition & 1 deletion crates/svm-builds/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//! Contains all solc builds for the platform it was compiled with
//! Contains all Solc builds for the platform it was compiled with.

build_const::build_const!("builds");
Loading