-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
024ef54
commit 2abd1ad
Showing
8 changed files
with
91 additions
and
3 deletions.
There are no files selected for viewing
Submodule prelude
updated
from decd03 to fd8363
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,19 @@ | ||
| use semver::{BuildMetadata, Prerelease, Version, VersionReq}; | ||
|
|
||
| fn main() { | ||
| hello_world::print_hello(); | ||
| let req = VersionReq::parse(">=1.2.3, <1.8.0").unwrap(); | ||
|
|
||
| // Check whether this requirement matches version 1.2.3-alpha.1 (no) | ||
| let version = Version { | ||
| major: 1, | ||
| minor: 2, | ||
| patch: 3, | ||
| pre: Prerelease::new("alpha.1").unwrap(), | ||
| build: BuildMetadata::EMPTY, | ||
| }; | ||
| assert!(!req.matches(&version)); | ||
|
|
||
| // Check whether it matches 1.3.0 (yes it does) | ||
| let version = Version::parse("1.3.0").unwrap(); | ||
| assert!(req.matches(&version)); | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| alias( | ||
| name = "semver", | ||
| actual = ":semver-1.0.17", | ||
| visibility = ["PUBLIC"], | ||
| ) | ||
|
|
||
| http_archive( | ||
| name = "semver-1.0.17.crate", | ||
| sha256 = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed", | ||
| strip_prefix = "semver-1.0.17", | ||
| urls = ["https://crates.io/api/v1/crates/semver/1.0.17/download"], | ||
| visibility = [], | ||
| ) | ||
|
|
||
| rust_library( | ||
| name = "semver-1.0.17", | ||
| srcs = [":semver-1.0.17.crate"], | ||
| crate = "semver", | ||
| crate_root = "semver-1.0.17.crate/src/lib.rs", | ||
| edition = "2018", | ||
| features = [ | ||
| "default", | ||
| "std", | ||
| ], | ||
| visibility = [], | ||
| ) | ||
|
|
||
| rust_binary( | ||
| name = "semver-1.0.17-build-script-build", | ||
| srcs = [":semver-1.0.17.crate"], | ||
| crate = "build_script_build", | ||
| crate_root = "semver-1.0.17.crate/build.rs", | ||
| edition = "2018", | ||
| features = [ | ||
| "default", | ||
| "std", | ||
| ], | ||
| visibility = [], | ||
| ) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| [workspace] | ||
|
|
||
| [package] | ||
| name = "rust-third-party" | ||
| version = "0.0.0" | ||
| publish = false | ||
| edition = "2021" | ||
|
|
||
| # Dummy target to keep Cargo happy | ||
| [[bin]] | ||
| name = "fake" | ||
| path = "/dev/null" | ||
|
|
||
| [dependencies] | ||
| semver = "1.0.17" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| vendor = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this change is part of my weird hacks to get msvc rust working, you probably do not want to do this.