Merge pull request #11 from mibes/feature/cargo-restructure

Cargo restructure
This commit is contained in:
Kedar Sovani 2023-01-16 09:50:12 +05:30 committed by GitHub
commit 1a0a41812d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 24 deletions

4
Cargo.toml Normal file
View file

@ -0,0 +1,4 @@
[workspace]
members = ["matter", "matter_macro_derive", "boxslab", "tools/tlv_tool"]
exclude = ["examples/*"]

View file

@ -1,33 +1,38 @@
# matter-rs: The Rust Implementation of Matter # matter-rs: The Rust Implementation of Matter
![experimental](https://img.shields.io/badge/status-Experimental-red) [![license](https://img.shields.io/badge/license-Apache2-green.svg)](https://raw.githubusercontent.com/project-chip/matter-rs/main/LICENSE) ![experimental](https://img.shields.io/badge/status-Experimental-red) [![license](https://img.shields.io/badge/license-Apache2-green.svg)](https://raw.githubusercontent.com/project-chip/matter-rs/main/LICENSE)
[![Test Linux (OpenSSL)](https://github.com/project-chip/matter-rs/actions/workflows/test-linux-openssl.yml/badge.svg)](https://github.com/project-chip/matter-rs/actions/workflows/test-linux-openssl.yml) [![Test Linux (OpenSSL)](https://github.com/project-chip/matter-rs/actions/workflows/test-linux-openssl.yml/badge.svg)](https://github.com/project-chip/matter-rs/actions/workflows/test-linux-openssl.yml)
[![Test Linux (mbedTLS)](https://github.com/project-chip/matter-rs/actions/workflows/test-linux-mbedtls.yml/badge.svg)](https://github.com/project-chip/matter-rs/actions/workflows/test-linux-mbedtls.yml) [![Test Linux (mbedTLS)](https://github.com/project-chip/matter-rs/actions/workflows/test-linux-mbedtls.yml/badge.svg)](https://github.com/project-chip/matter-rs/actions/workflows/test-linux-mbedtls.yml)
## Build ## Build
Building the library: Building the library:
``` ```
$ cd matter
$ cargo build $ cargo build
``` ```
Building the example: Building the example:
``` ```
$ cd matter
$ RUST_LOG="matter" cargo run --example onoff_light $ RUST_LOG="matter" cargo run --example onoff_light
``` ```
With the chip-tool (the current tool for testing Matter) use the Ethernet commissioning mechanism: With the chip-tool (the current tool for testing Matter) use the Ethernet commissioning mechanism:
```
$ chip-tool pairing code 12344321 <Pairing-Code>
```
Or alternatively:
``` ```
$ chip-tool pairing ethernet 12344321 123456 0 <IP-Address> 5540 $ chip-tool pairing ethernet 12344321 123456 0 <IP-Address> 5540
``` ```
Interact with the device Interact with the device
``` ```
# Read server-list # Read server-list
$ chip-tool descriptor read server-list 12344321 0 $ chip-tool descriptor read server-list 12344321 0
@ -40,6 +45,7 @@ $ chip-tool onoff on 12344321 1
``` ```
## Functionality ## Functionality
- Secure Channel: - Secure Channel:
- PASE - PASE
- CASE - CASE
@ -55,4 +61,3 @@ $ chip-tool onoff on 12344321 1
## Notes ## Notes
The matter-rs project is a work-in-progress and does NOT yet fully implement Matter. The matter-rs project is a work-in-progress and does NOT yet fully implement Matter.

4
examples/Cargo.toml Normal file
View file

@ -0,0 +1,4 @@
[workspace]
members = ["*"]
exclude = ["target", ".cargo"]
resolver = "2"

View file

@ -21,31 +21,31 @@ crypto_mbedtls = ["mbedtls"]
crypto_esp_mbedtls = ["esp-idf-sys"] crypto_esp_mbedtls = ["esp-idf-sys"]
[dependencies] [dependencies]
boxslab = { path = "../boxslab"} boxslab = { path = "../boxslab" }
matter_macro_derive = { path = "../matter_macro_derive"} matter_macro_derive = { path = "../matter_macro_derive" }
bitflags = "1.3" bitflags = "1.3"
byteorder = "1.4.3" byteorder = "1.4.3"
heapless = {version = "0.7.7", features = ["x86-sync-pool"] } heapless = { version = "0.7.16", features = ["x86-sync-pool"] }
generic-array = "0.14.5" generic-array = "0.14.6"
num = "0.3" num = "0.4"
num-derive = "0.3.3" num-derive = "0.3.3"
num-traits = "0.2.14" num-traits = "0.2.15"
log = { version = "0.4.14", features = ["max_level_debug", "release_max_level_debug"] } log = { version = "0.4.17", features = ["max_level_debug", "release_max_level_debug"] }
env_logger = "0.9.0" env_logger = "0.10.0"
rand = "0.8.4" rand = "0.8.5"
esp-idf-sys = { version = "0.30", features = ["binstart"], optional = true } esp-idf-sys = { version = "0.32", features = ["binstart"], optional = true }
openssl = { git = "https://github.com/sfackler/rust-openssl", optional = true} openssl = { git = "https://github.com/sfackler/rust-openssl", optional = true }
foreign-types = { version = "0.3.1", optional = true} foreign-types = { version = "0.3.2", optional = true }
sha2 = { version = "0.9.8", optional = true} sha2 = { version = "0.9.9", optional = true }
hmac = { version = "0.11.0", optional = true} hmac = { version = "0.11.0", optional = true }
mbedtls = { git = "https://github.com/fortanix/rust-mbedtls", optional = true} mbedtls = { git = "https://github.com/fortanix/rust-mbedtls", optional = true }
subtle = "2.4.1" subtle = "2.4.1"
colored = "2.0.0" colored = "2.0.0"
smol = "1.2.5" smol = "1.3.0"
owning_ref = "0.4.1" owning_ref = "0.4.1"
safemem = "0.3.3" safemem = "0.3.3"
chrono = { version = "0.4.19", default-features = false, features = ["clock", "std"] } chrono = { version = "0.4.23", default-features = false, features = ["clock", "std"] }
async-channel = "1.6" async-channel = "1.8"
# to compute the check digit # to compute the check digit
verhoeff = "1" verhoeff = "1"