Skip to content
Open
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
525 changes: 172 additions & 353 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "avml"
version = "0.17.0"
version = "0.18.0"
license = "MIT"
description = "A portable volatile memory acquisition tool"
authors = ["[email protected]"]
Expand All @@ -15,11 +15,12 @@ rust-version = "1.88.0"
[features]
default = ["put", "blobstore", "native-tls"]
put = ["dep:reqwest", "reqwest?/stream", "dep:url", "dep:tokio", "dep:tokio-util"]
blobstore = ["dep:url", "dep:azure_core", "dep:azure_storage_blobs", "dep:tokio", "dep:tokio-util", "dep:async-channel"]
blobstore = ["dep:url", "dep:azure_core", "dep:azure_storage_blob", "dep:tokio", "dep:tokio-util", "dep:async-trait"]
status = ["dep:indicatif"]
native-tls = ["dep:native-tls"]
native-tls = ["dep:native-tls", "azure_core?/reqwest_native_tls", "reqwest?/native-tls-vendored"]

[dependencies]
async-trait = {version="0.1", optional=true}
byteorder = "1.5"
bytes = "1.11"
clap = {version="4.6", default-features=false, features=["derive", "std", "usage", "error-context", "help"]}
Expand All @@ -30,9 +31,8 @@ snap = "1.1"
thiserror = "2.0"
libc = "0.2"

async-channel = {version="2.5", optional=true}
azure_core = {version="0.21", optional=true, default-features=false}
azure_storage_blobs = {version="0.21", optional=true, default-features=false}
azure_core = {version="0.33", optional=true, default-features=false, features=["reqwest", "tokio"]}
azure_storage_blob = {version="0.10", optional=true, default-features=false}
indicatif = {version="0.18", optional=true, default-features=false}
native-tls = {version="0.2", features=["vendored"], optional=true, default-features=false}
reqwest = {version="0.13", optional=true, default-features=false}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ Options:
upload via Azure Blob Store upon acquisition

--sas-block-size <SAS_BLOCK_SIZE>
specify maximum block size in MiB
specify maximum block size in MiB; must be greater than 0

--sas-block-concurrency <SAS_BLOCK_CONCURRENCY>
specify blob upload concurrency
specify blob upload concurrency; must be greater than 0

[default: 10]

Expand Down
1 change: 1 addition & 0 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ cd $(dirname ${BASH_SOURCE[0]})/../
ARCH=$(uname -m)

cargo +stable test --release --target ${ARCH}-unknown-linux-musl --locked --all-targets --all-features
cargo +stable test --release --target ${ARCH}-unknown-linux-musl --locked --doc --all-features
for FEATURE in $(cargo metadata --locked --format-version 1 | jq '.packages | [.[] | select(.name=="avml")][0].features | keys | @tsv' -r); do
cargo +stable check --release --target ${ARCH}-unknown-linux-musl --locked --no-default-features --features ${FEATURE} --features native-tls
done
Expand Down
14 changes: 7 additions & 7 deletions src/bin/avml-upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#![deny(clippy::manual_assert)]
#![deny(clippy::indexing_slicing)]

use avml::{BlobUploader, DEFAULT_CONCURRENCY, Error, Result, put};
use avml::{BlobUploader, Error, Result, put};
use clap::{Parser, Subcommand};
use std::path::PathBuf;
use std::{num::NonZeroUsize, path::PathBuf};
use tokio::runtime::Runtime;
use url::Url;

Expand Down Expand Up @@ -37,13 +37,13 @@ enum Commands {
/// url to upload via Azure Blob Storage
url: Url,

/// specify blob upload concurrency
#[arg(long, default_value_t=DEFAULT_CONCURRENCY)]
sas_block_concurrency: usize,
/// specify blob upload concurrency; must be greater than 0
#[arg(long)]
sas_block_concurrency: Option<NonZeroUsize>,

/// specify maximum block size in MiB
/// specify maximum block size in MiB; must be greater than 0
#[arg(long)]
sas_block_size: Option<usize>,
sas_block_size: Option<NonZeroUsize>,
},
}

Expand Down
12 changes: 7 additions & 5 deletions src/bin/avml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
use avml::Error;
use avml::{Result, Snapshot, Source, iomem};
use clap::Parser;
#[cfg(feature = "blobstore")]
use std::num::NonZeroUsize;
use std::{num::NonZeroU64, ops::Range, path::PathBuf};
#[cfg(any(feature = "blobstore", feature = "put"))]
use tokio::{fs::remove_file, runtime::Runtime};
Expand Down Expand Up @@ -52,15 +54,15 @@ struct Config {
#[arg(long)]
sas_url: Option<Url>,

/// specify maximum block size in MiB
/// specify maximum block size in MiB; must be greater than 0
#[cfg(feature = "blobstore")]
#[arg(long)]
sas_block_size: Option<usize>,
sas_block_size: Option<NonZeroUsize>,

/// specify blob upload concurrency
/// specify blob upload concurrency; must be greater than 0
#[cfg(feature = "blobstore")]
#[arg(long, default_value_t=avml::DEFAULT_CONCURRENCY)]
sas_block_concurrency: usize,
#[arg(long)]
sas_block_concurrency: Option<NonZeroUsize>,

/// name of the file to write to on local system
filename: PathBuf,
Expand Down
Loading
Loading