Skip to content

Commit

Permalink
Add comments to explain how Rust workspace is managed
Browse files Browse the repository at this point in the history
  • Loading branch information
yogh333 committed Jul 30, 2024
1 parent 842683d commit 76f2419
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ragger/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ def find_application(base_dir: Path, device: str, sdk: str) -> Path:
raise AssertionError(f"{base_dir} is not a directory")
app = base_dir.resolve()
if sdk.lower() == "rust":
"""
When building a Rust app, the resulting binary is located in a target
directory target/<device>/release/<app_name>. app is the Path to the
build directory, where is stored the app's Cargo.toml file.
If the app respository is organized as a workspace crate (several packages,

Check failure on line 78 in src/ragger/utils/misc.py

View workflow job for this annotation

GitHub Actions / Check misspellings

respository ==> repository

Check failure on line 78 in src/ragger/utils/misc.py

View workflow job for this annotation

GitHub Actions / Check misspellings

crate ==> create
each package in its own directory with its own Cargo.toml), the binaries are
all stored in the same target directory. 'cargo metadata' is used to get the
target directory full path.
"""
if device == "nanos2":
device = "nanosplus"
app_name = toml.load(base_dir / "Cargo.toml")["package"]["name"]
Expand Down

0 comments on commit 76f2419

Please sign in to comment.