Bläddra i källkod

lib: move back rustsbi as root crate

Signed-off-by: DongQing <[email protected]>
DongQing 1 år sedan
förälder
incheckning
d1656b5b00

+ 46 - 2
Cargo.toml

@@ -1,9 +1,53 @@
+[package]
+name = "rustsbi"
+description = "Minimal RISC-V's SBI implementation library in Rust"
+version = "0.4.0-alpha.1"
+authors = [
+    "Luo Jia <[email protected]>",
+    "Campbell He <[email protected]>",
+    "Yifan Wu <[email protected]>",
+]
+repository = "https://github.com/rustsbi/rustsbi"
+documentation = "https://docs.rs/rustsbi"
+license = "MulanPSL-2.0 OR MIT"
+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"
+riscv = { version = "0.10.1", optional = true }
+sbi-rt = { version = "0.0.3-rc.5", features = ["integer-impls"], optional = true }
+rustsbi-macros = { version = "0.0.0", path = "macros" }
+
+[features]
+default = []
+# Run RustSBI on machine mode.
+# This feature enables to use RISC-V primitives on current machine mode environment
+# If you are developing a cross-architecture virtual machine, consider disabling this feature
+# to customize environment variables for RISC-V architecture like mvendorid, mimpid, etc.
+machine = ["rustsbi-macros/machine", "dep:riscv"]
+# Enables the struct `Forward`.
+# Struct `Forward` uses current SBI environment to implement the RustSBI environment.
+# This feature is only usable when current software runs on another SBI environment,
+# e.g. hypervisors for RISC-V architecture.
+forward = ["dep:sbi-rt"]
+
+[package.metadata.docs.rs]
+default-target = "riscv64imac-unknown-none-elf"
+targets = [
+    "riscv32imac-unknown-none-elf", "riscv64imac-unknown-none-elf",
+]
+
 [workspace]
 members = [
-    "rustsbi",
-    "rustsbi/macros",
+    "macros",
     "sbi-rt",
     "sbi-spec",
     "sbi-testing",
 ]
 resolver = "2"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

+ 0 - 0
rustsbi/examples/derive/commons.rs → examples/derive/commons.rs


+ 0 - 0
rustsbi/examples/derive/main.rs → examples/derive/main.rs


+ 0 - 0
rustsbi/macros/Cargo.toml → macros/Cargo.toml


+ 0 - 0
rustsbi/macros/src/lib.rs → macros/src/lib.rs


+ 0 - 44
rustsbi/Cargo.toml

@@ -1,44 +0,0 @@
-[package]
-name = "rustsbi"
-description = "Minimal RISC-V's SBI implementation library in Rust"
-version = "0.4.0-alpha.1"
-authors = [
-    "Luo Jia <[email protected]>",
-    "Campbell He <[email protected]>",
-    "Yifan Wu <[email protected]>",
-]
-repository = "https://github.com/rustsbi/rustsbi"
-documentation = "https://docs.rs/rustsbi"
-license = "MulanPSL-2.0 OR MIT"
-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"
-riscv = { version = "0.10.1", optional = true }
-sbi-rt = { version = "0.0.3-rc.5", features = ["integer-impls"], optional = true }
-rustsbi-macros = { version = "0.0.0", path = "macros" }
-
-[features]
-default = []
-# Run RustSBI on machine mode.
-# This feature enables to use RISC-V primitives on current machine mode environment
-# If you are developing a cross-architecture virtual machine, consider disabling this feature
-# to customize environment variables for RISC-V architecture like mvendorid, mimpid, etc.
-machine = ["rustsbi-macros/machine", "dep:riscv"]
-# Enables the struct `Forward`.
-# Struct `Forward` uses current SBI environment to implement the RustSBI environment.
-# This feature is only usable when current software runs on another SBI environment,
-# e.g. hypervisors for RISC-V architecture.
-forward = ["dep:sbi-rt"]
-
-[package.metadata.docs.rs]
-default-target = "riscv64imac-unknown-none-elf"
-targets = [
-    "riscv32imac-unknown-none-elf", "riscv64imac-unknown-none-elf",
-]
-
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

+ 0 - 0
rustsbi/src/console.rs → src/console.rs


+ 0 - 0
rustsbi/src/cppc.rs → src/cppc.rs


+ 0 - 0
rustsbi/src/forward.rs → src/forward.rs


+ 0 - 0
rustsbi/src/hsm.rs → src/hsm.rs


+ 0 - 0
rustsbi/src/ipi.rs → src/ipi.rs


+ 0 - 0
rustsbi/src/lib.rs → src/lib.rs


+ 0 - 0
rustsbi/src/nacl.rs → src/nacl.rs


+ 0 - 0
rustsbi/src/pmu.rs → src/pmu.rs


+ 0 - 0
rustsbi/src/reset.rs → src/reset.rs


+ 0 - 0
rustsbi/src/rfence.rs → src/rfence.rs


+ 0 - 0
rustsbi/src/sta.rs → src/sta.rs


+ 0 - 0
rustsbi/src/susp.rs → src/susp.rs


+ 0 - 0
rustsbi/src/timer.rs → src/timer.rs


+ 0 - 0
rustsbi/src/traits.rs → src/traits.rs


+ 0 - 0
rustsbi/tests/build-full.rs → tests/build-full.rs


+ 0 - 0
rustsbi/tests/build-generics.rs → tests/build-generics.rs


+ 0 - 0
rustsbi/tests/build-rename.rs → tests/build-rename.rs


+ 0 - 0
rustsbi/tests/build-skip.rs → tests/build-skip.rs


+ 0 - 0
rustsbi/tests/forward-struct.rs → tests/forward-struct.rs