Bladeren bron

lib: inherit edition, license and repo from workspace

set dependency path to relative paths

Signed-off-by: Zhouqi Jiang <luojia@hust.edu.cn>
Zhouqi Jiang 1 jaar geleden
bovenliggende
commit
1f579c636a
5 gewijzigde bestanden met toevoegingen van 26 en 21 verwijderingen
  1. 11 6
      Cargo.toml
  2. 3 3
      macros/Cargo.toml
  3. 4 4
      sbi-rt/Cargo.toml
  4. 3 3
      sbi-spec/Cargo.toml
  5. 5 5
      sbi-testing/Cargo.toml

+ 11 - 6
Cargo.toml

@@ -7,19 +7,19 @@ authors = [
     "Campbell He <hkp18@mails.tsinghua.edu.cn>",
     "Yifan Wu <shinbokuow@163.com>",
 ]
-repository = "https://github.com/rustsbi/rustsbi"
 documentation = "https://docs.rs/rustsbi"
-license = "MulanPSL-2.0 OR MIT"
+edition.workspace = true
+license.workspace = true
+repository.workspace = true
 readme = "README.md"
 keywords = ["riscv", "sbi", "rustsbi"]
 categories = ["os", "embedded", "hardware-support", "no-std"]
-edition = "2021"
 exclude = ["/.github"]
 
 [dependencies]
-sbi-spec = "0.0.7-alpha.3"
+sbi-spec = { version = "0.0.7-alpha.3", path = "sbi-spec" }
 riscv = { version = "0.10.1", optional = true }
-sbi-rt = { version = "0.0.3-rc.5", features = ["integer-impls"], optional = true }
+sbi-rt = { version = "0.0.3-rc.5", features = ["integer-impls"], optional = true, path = "sbi-rt" }
 rustsbi-macros = { version = "0.0.0", path = "macros" }
 
 [features]
@@ -42,12 +42,17 @@ targets = [
 ]
 
 [workspace]
+resolver = "2"
 members = [
     "macros",
     "sbi-rt",
     "sbi-spec",
     "sbi-testing",
 ]
-resolver = "2"
+
+[workspace.package]
+edition = "2021"
+license = "MulanPSL-2.0 OR MIT"
+repository = "https://github.com/rustsbi/rustsbi"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

+ 3 - 3
macros/Cargo.toml

@@ -5,13 +5,13 @@ version = "0.0.0"
 authors = [
     "Luo Jia <me@luojia.cc>",
 ]
-repository = "https://github.com/rustsbi/rustsbi"
 documentation = "https://docs.rs/rustsbi"
-license = "MulanPSL-2.0 OR MIT"
+edition.workspace = true
+license.workspace = true
+repository.workspace = true
 readme = "../README.md"
 keywords = ["riscv", "sbi", "rustsbi"]
 categories = ["os", "embedded", "hardware-support", "no-std"]
-edition = "2021"
 
 [lib]
 proc-macro = true

+ 4 - 4
sbi-rt/Cargo.toml

@@ -1,7 +1,6 @@
 [package]
 name = "sbi-rt"
 version = "0.0.3-rc.5"
-edition = "2021"
 description = "Runtime library for supervisors to call RISC-V Supervisor Binary Interface (RISC-V SBI)"
 categories = ["os", "embedded", "hardware-support", "no-std"]
 keywords = ["riscv", "sbi", "rustsbi"]
@@ -9,9 +8,10 @@ authors = [
     "YdrMaster <ydrml@hotmail.com>",
     "Luo Jia <me@luojia.cc>",
 ]
-repository = "https://github.com/rustsbi/sbi-rt"
 documentation = "https://docs.rs/sbi-rt"
-license = "MulanPSL-2.0 OR MIT"
+edition.workspace = true
+license.workspace = true
+repository.workspace = true
 readme = "README.md"
 
 [package.metadata.docs.rs]
@@ -21,7 +21,7 @@ targets = [
 ]
 
 [dependencies]
-sbi-spec = "0.0.7-alpha.3"
+sbi-spec = { version = "0.0.7-alpha.3", path = "../sbi-spec" }
 
 [features]
 default = []

+ 3 - 3
sbi-spec/Cargo.toml

@@ -3,13 +3,13 @@ name = "sbi-spec"
 description = "Definitions and constants in RISC-V Supervisor Binary Interface (RISC-V SBI)"
 version = "0.0.7-alpha.3"
 authors = ["YdrMaster <ydrml@hotmail.com>", "Luo Jia <me@luojia.cc>"]
-repository = "https://github.com/rustsbi/sbi-spec"
 documentation = "https://docs.rs/sbi-spec"
-license = "MulanPSL-2.0 OR MIT"
+edition.workspace = true
+license.workspace = true
+repository.workspace = true
 readme = "README.md"
 keywords = ["riscv", "sbi", "rustsbi"]
 categories = ["os", "embedded", "hardware-support", "no-std"]
-edition = "2021"
 
 [dev-dependencies]
 static_assertions = "1.1.0"

+ 5 - 5
sbi-testing/Cargo.toml

@@ -1,14 +1,14 @@
 [package]
 name = "sbi-testing"
 version = "0.0.3-rc.0"
-edition = "2021"
 description = "Provide a set of test cases for supervisors to verify functions of the supervisor executation environment"
 categories = ["os", "no-std"]
 keywords = ["riscv", "sbi", "rustsbi"]
 authors = ["YdrMaster <ydrml@hotmail.com>"]
-repository = "https://github.com/rustsbi/sbi-testing"
 documentation = "https://docs.rs/sbi-testing"
-license = "MulanPSL-2.0 OR MIT"
+edition.workspace = true
+license.workspace = true
+repository.workspace = true
 readme = "README.md"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -18,8 +18,8 @@ default-target = "riscv64imac-unknown-none-elf"
 targets = ["riscv32imac-unknown-none-elf", "riscv64imac-unknown-none-elf"]
 
 [dependencies]
-sbi-rt = "0.0.3-rc.5"
-sbi-spec = "0.0.7-alpha.3"
+sbi-rt = { version = "0.0.3-rc.5", path = "../sbi-rt" }
+sbi-spec = { version = "0.0.7-alpha.3", path = "../sbi-spec" }
 riscv = "0.10.1"
 log_crate = { version = "0.4", package = "log", optional = true }