Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kamiyaa committed Jan 24, 2025
1 parent d082240 commit 926bb0b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions rust/main/utils/run-locally/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ pub fn get_matching_lines(file: &File, search_strings: &[&str]) -> HashMap<Strin
matches
}

/// More reliable way of generating relative paths
/// such as wanting to get to sealevel directory
/// Returns absolute path to rust workspace
/// `/<...>/hyperlane-monorepo/rust/main`.
/// This allows us to have a more reliable way of generating
/// relative paths such path to sealevel directory
pub fn get_workspace_path() -> PathBuf {
let output = Command::new(env!("CARGO"))
.arg("locate-project")
Expand All @@ -152,6 +154,8 @@ pub fn get_workspace_path() -> PathBuf {
workspace_path
}

/// Returns absolute path to sealevel directory
/// `/<...>/hyperlane-monorepo/rust/sealevel`
pub fn get_sealevel_path(workspace_path: &Path) -> PathBuf {
concat_path(
workspace_path
Expand All @@ -161,6 +165,8 @@ pub fn get_sealevel_path(workspace_path: &Path) -> PathBuf {
)
}

/// Returns absolute path to typescript infra directory
/// `/<...>/hyperlane-monorepo/typescript/infra`
pub fn get_ts_infra_path(workspace_path: &Path) -> PathBuf {
concat_path(
workspace_path
Expand Down

0 comments on commit 926bb0b

Please sign in to comment.