Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rs/libmoq/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Luke Curley <[email protected]>", "Brian Medley <[email protected]>"
repository = "https://github.com/moq-dev/moq"
license = "MIT OR Apache-2.0"

version = "0.2.0"
version = "0.2.1"
edition = "2021"

keywords = ["quic", "http3", "webtransport", "media", "live"]
Expand Down
19 changes: 10 additions & 9 deletions rs/libmoq/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ fn main() {
}

fn target_dir() -> PathBuf {
// Always use the workspace target directory (target/)
// regardless of whether --target is used or not.
// CARGO_MANIFEST_DIR is rs/libmoq/, so go up two levels to repo root
PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap())
.parent()
.expect("Failed to get parent of CARGO_MANIFEST_DIR")
.parent()
.expect("Failed to get repo root")
.join("target")
// OUT_DIR is always set by Cargo to something like:
// target/{debug|release}/build/{crate}-{hash}/out
// Go up 4 levels to get to target/
PathBuf::from(env::var("OUT_DIR").unwrap())
.parent() // build/{crate}-{hash}
.and_then(|p| p.parent()) // build/
.and_then(|p| p.parent()) // {debug|release}/
.and_then(|p| p.parent()) // target/
.expect("Failed to get target directory from OUT_DIR")
.to_path_buf()
}
Loading