Skip to content

Commit 149e3e7

Browse files
refactor!: move deploy_integration from dfir to hydro_lang, rename mod resource_measurement to launch (#2390)
BREAKING CHANGE: `deploy_integration` feature and APIs are removed from `dfir_rs`, moved into `launch` module BREAKING CHANGE: `resource_measurement` module renamed to `launch`
1 parent 250223e commit 149e3e7

File tree

19 files changed

+108
-473
lines changed

19 files changed

+108
-473
lines changed

Cargo.lock

Lines changed: 10 additions & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ members = [
99
"dfir_rs",
1010
"example_test",
1111
"hydro_deploy/core",
12-
"hydro_deploy/hydro_deploy_examples",
1312
"hydro_deploy/hydro_deploy_integration",
1413
"hydro_lang",
1514
"hydro_std",

dfir_rs/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ default = [ "macros", "debugging", "meta" ]
1717
meta = [ "dep:dfir_lang" ]
1818
macros = [ "dfir_macro" ]
1919
dfir_macro = [ "dep:dfir_macro" ]
20-
deploy_integration = [ "dep:hydro_deploy_integration" ]
2120
debugging = [ "dfir_lang/debugging" ]
2221

2322
[package.metadata.docs.rs]

dfir_rs/src/util/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,15 @@ pub use tcp::*;
2727

2828
#[cfg(unix)]
2929
mod socket;
30-
#[cfg(unix)]
31-
pub use socket::*;
32-
33-
#[cfg(feature = "deploy_integration")]
34-
#[cfg_attr(docsrs, doc(cfg(feature = "deploy_integration")))]
35-
pub mod deploy;
36-
3730
use std::net::SocketAddr;
3831
use std::num::NonZeroUsize;
3932
use std::task::{Context, Poll};
4033

4134
use futures::Stream;
4235
use serde::de::DeserializeOwned;
4336
use serde::ser::Serialize;
37+
#[cfg(unix)]
38+
pub use socket::*;
4439

4540
/// Persit or delete tuples
4641
pub enum Persistence<T> {

hydro_deploy/core/src/rust_crate/build.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ impl BuildParams {
5858
// Rust codegen pattern on windows. To help mitigate this happening in third party crates, we
5959
// instead use `dunce::canonicalize` which is the same as `fs::canonicalize` but avoids the
6060
// `\\?\` prefix when possible.
61-
let src = dunce::canonicalize(src).expect("Failed to canonicalize path for build.");
61+
let src = dunce::canonicalize(src.as_ref()).unwrap_or_else(|e| {
62+
panic!(
63+
"Failed to canonicalize path `{}` for build: {e}.",
64+
src.as_ref().display(),
65+
)
66+
});
6267

6368
BuildParams {
6469
src,

hydro_deploy/core/src/rust_crate/mod.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -210,31 +210,3 @@ impl ServiceBuilder for RustCrate {
210210
)
211211
}
212212
}
213-
214-
#[cfg(test)]
215-
mod tests {
216-
use super::*;
217-
use crate::deployment;
218-
219-
#[tokio::test]
220-
async fn test_crate_panic() {
221-
let mut deployment = deployment::Deployment::new();
222-
223-
let service = deployment.add_service(
224-
RustCrate::new("../hydro_deploy_examples")
225-
.example("panic_program")
226-
.profile("dev"),
227-
deployment.Localhost(),
228-
);
229-
230-
deployment.deploy().await.unwrap();
231-
232-
let mut stdout = service.stdout();
233-
234-
deployment.start().await.unwrap();
235-
236-
assert_eq!(stdout.recv().await.unwrap(), "hello!");
237-
238-
assert!(stdout.recv().await.is_none());
239-
}
240-
}

hydro_deploy/hydro_deploy_examples/Cargo.toml

Lines changed: 0 additions & 20 deletions
This file was deleted.

hydro_deploy/hydro_deploy_examples/examples/empty_program/main.rs

Lines changed: 0 additions & 7 deletions
This file was deleted.

hydro_deploy/hydro_deploy_examples/examples/panic_program/main.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

hydro_deploy/hydro_deploy_examples/examples/stdout_receiver/main.rs

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)