diff --git a/Cargo.toml b/Cargo.toml index ae2dae3..96befb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,5 @@ -[package] -name = "crate-template" -version = "0.1.0" -authors = ["TODO"] -description = "This is a template for creating rust-vmm repositories." -repository = "https://github.com/rust-vmm/crate-template" -readme = "README.md" -keywords = ["virt"] -license = "Apache-2.0 OR BSD-3-Clause" -edition = "2018" +[workspace] -[dependencies] +members = [ + "src/i2c", +] diff --git a/src/i2c/Cargo.toml b/src/i2c/Cargo.toml new file mode 100644 index 0000000..f128081 --- /dev/null +++ b/src/i2c/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "vhost-device-i2c" +version = "0.1.0" +authors = ["Viresh Kumar "] +description = "vhost i2c backend device" +repository = "https://github.com/rust-vmm/vhost-device" +readme = "README.md" +keywords = ["i2c", "vhost", "virt", "backend"] +license = "Apache-2.0 OR BSD-3-Clause" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/src/i2c/README.md b/src/i2c/README.md new file mode 100644 index 0000000..d2af0db --- /dev/null +++ b/src/i2c/README.md @@ -0,0 +1,41 @@ +# Crate Name + +## Design + +TODO: This section should have a high-level design of the crate. + +Some questions that might help in writing this section: +- What is the purpose of this crate? +- What are the main components of the crate? How do they interact which each + other? + +## Usage + +TODO: This section describes how the crate is used. + +Some questions that might help in writing this section: +- What traits do users need to implement? +- Does the crate have any default/optional features? What is each feature + doing? +- Is this crate used by other rust-vmm components? If yes, how? + +## Examples + +TODO: Usage examples. + +```rust +use my_crate; + +... +``` + +## License + +**!!!NOTICE**: The BSD-3-Clause license is not included in this template. +The license needs to be manually added because the text of the license file +also includes the copyright. The copyright can be different for different +crates. If the crate contains code from CrosVM, the crate must add the +CrosVM copyright which can be found +[here](https://chromium.googlesource.com/chromiumos/platform/crosvm/+/master/LICENSE). +For crates developed from scratch, the copyright is different and depends on +the contributors. diff --git a/src/i2c/src/main.rs b/src/i2c/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/i2c/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/src/lib.rs b/src/lib.rs deleted file mode 100644 index 845a298..0000000 --- a/src/lib.rs +++ /dev/null @@ -1,6 +0,0 @@ -#![deny(missing_docs)] -//! Dummy crate needs high-level documentation. -/// Dummy public function needs documentation. -pub fn it_works() { - assert!(true); -}