-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial attempt at a Rust AMQP stack, merged against feature/rust_amq…
…p for now. (#5942) * Enabled building AMQP *without* uAMQP * Start integrating Rust AMQP Value to C++ AMQP Value * AMQP Value tests now pass * Moved AmqpValueType ostream inserter to its original location * Added Rust AMQP Message implementation * Added start of message source tests * Enabled building AMQP *without* uAMQP * Start integrating Rust AMQP Value to C++ AMQP Value * Moved AmqpValueType ostream inserter to its original location * Message target support * Message source and target support
- Loading branch information
1 parent
fdfc6e0
commit 3fa6db9
Showing
102 changed files
with
14,984 additions
and
1,070 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = [ | ||
"sdk/core/azure-core-amqp/rust_amqp/azure_core_amqp", | ||
"sdk/core/azure-core-amqp/rust_amqp/rust_wrapper", | ||
] | ||
|
||
[workspace.package] | ||
authors = ["Microsoft"] | ||
edition = "2021" | ||
license = "MIT" | ||
repository = "https://github.com/azure/azure-sdk-for-rust" | ||
rust-version = "1.76" | ||
|
||
|
||
[workspace.dependencies.azure_core_amqp] | ||
path = "sdk/core/azure-core-amqp/rust_amqp/azure_core_amqp" | ||
|
||
|
||
[workspace.dependencies] | ||
azure_core = { version = "0.18" } | ||
azure_identity = "0.18" | ||
async-lock = "3.0" | ||
async-process = "2.0" | ||
async-std = { version = "1.12", features = ["attributes"] } | ||
async-trait = "0.1" | ||
base64 = "0.22" | ||
bytes = "1.0" | ||
cbindgen = "0.26.0" | ||
clap = { version = "4.4.16", features = ["derive"] } | ||
dyn-clone = "1.0" | ||
fe2o3-amqp = { version = "0.12", features = ["native-tls", "tracing", "uuid"] } | ||
fe2o3-amqp-ext = { version = "0.12", features = [] } | ||
fe2o3-amqp-management = { version = "0.12" } | ||
fe2o3-amqp-cbs = { version = "0.12" } | ||
fe2o3-amqp-types = { version = "0.12" } | ||
futures = "0.3" | ||
getrandom = { version = "0.2", features = ["js"] } | ||
hmac = { version = "0.12" } | ||
http-types = { version = "2.12", default-features = false } | ||
oauth2 = { version = "4.0.0", default-features = false } | ||
once_cell = "1.18" | ||
openssl = { version = "0.10.46" } | ||
paste = "1.0" | ||
pin-project = "1.0" | ||
quick-xml = { version = "0.31", features = ["serialize", "serde-types"] } | ||
rand = "0.8" | ||
reqwest = { version = "0.12", features = [ | ||
"json", | ||
"stream", | ||
], default-features = false } | ||
rustc_version = "0.4" | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_amqp = { version = "0.12.2", features = ["uuid"] } | ||
serde_bytes = { version = "0.11" } | ||
serde_json = "1.0" | ||
serde_test = "1" | ||
serial_test = "3.0" | ||
sha2 = { version = "0.10" } | ||
thiserror = "1.0" | ||
time = { version = "0.3.10", features = [ | ||
"serde-well-known", | ||
"macros", | ||
"wasm-bindgen", | ||
] } | ||
tokio = { version = "1.0", default-features = false, features = [ | ||
"rt-multi-thread", | ||
"macros", | ||
"time", | ||
] } | ||
tracing = "0.1.40" | ||
tracing-subscriber = "0.3" | ||
tz-rs = { version = "0.6" } | ||
url = "2.2" | ||
uuid = { version = "1.0", features = ["v4"] } | ||
|
||
[workspace.lints] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# CMake function to download the "rustup-init" script and run it to install Rust | ||
|
||
# cspell: words rustup rustc | ||
|
||
# This function will download the "rustup-init" script from the Rust website and run it to install Rust. | ||
function(install_rustup) | ||
if(WIN32) | ||
set(_USER_HOME $ENV{USERPROFILE}) | ||
set(_CARGO_NAME "cargo.exe") | ||
set(_RUSTC_NAME "rustc.exe") | ||
else() | ||
set(_USER_HOME $ENV{HOME}) | ||
set(_CARGO_NAME "cargo") | ||
set(_RUSTC_NAME "rustc") | ||
endif() | ||
|
||
if (EXISTS "${_USER_HOME}/.cargo/bin/${_CARGO_NAME}") | ||
set(RUST_EXISTS TRUE) | ||
else() | ||
set(RUST_EXISTS FALSE) | ||
endif() | ||
|
||
if (NOT ${RUST_EXISTS}) | ||
message(STATUS "Rust is not installed. Downloading and installing Rust using rustup...") | ||
set(RUSTUP_URL "https://sh.rustup.rs") | ||
set(RUSTUP_INIT_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/rustup-init.sh") | ||
|
||
if(WIN32) | ||
set(RUSTUP_URL "https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe") | ||
# On Windows, the "rustup-init" script is a .exe file | ||
set(RUSTUP_INIT_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/rustup-init.exe") | ||
endif() | ||
|
||
message(STATUS "Downloading and installing Rust using rustup to ${RUSTUP_INIT_SCRIPT}") | ||
message(STATUS "Download URL: ${RUSTUP_URL}") | ||
# Download the "rustup-init" script | ||
if(WIN32) | ||
file(DOWNLOAD "${RUSTUP_URL}" "${RUSTUP_INIT_SCRIPT}" | ||
EXPECTED_HASH SHA256=92535fbde0c7ce45dce7d58f853d89ab1f873d29f78e6d80382f76ca2d1984cf | ||
SHOW_PROGRESS) | ||
else() | ||
file(DOWNLOAD "${RUSTUP_URL}" "${RUSTUP_INIT_SCRIPT}" | ||
EXPECTED_HASH SHA256=32a680a84cf76014915b3f8aa44e3e40731f3af92cd45eb0fcc6264fd257c428 | ||
SHOW_PROGRESS) | ||
endif() | ||
# Make the script executable | ||
file(COPY "${RUSTUP_INIT_SCRIPT}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") | ||
|
||
if(WIN32) | ||
# Run the rustup-init script on Windows | ||
message(STATUS "Running rustup-init.exe") | ||
execute_process(COMMAND "${CMAKE_CURRENT_BINARY_DIR}/rustup-init.exe" -y RESULTS_VARIABLE _RESULTS OUTPUT_VARIABLE _OUTPUT ERROR_VARIABLE _ERROR) | ||
message(STATUS "Running rustup-init.exe completed: ${_RESULTS}") | ||
if (NOT ${_RESULTS} EQUAL 0) | ||
message(FATAL "rustup-init failed: ${_OUTPUT}") | ||
message(FATAL "Error: ${_ERROR}") | ||
endif() | ||
message(STATUS "Output: ${_OUTPUT}") | ||
message(STATUS "Error: ${_ERROR}") | ||
|
||
set(ENV{PATH} "$ENV{_USER_HOME}/.cargo/bin:$ENV{PATH}") | ||
set(Rust_COMPILER ${_USER_HOME}/.cargo/bin/${_RUSTC_NAME}) | ||
else() | ||
# Run the rustup-init script on Linux | ||
message(STATUS "Running rustup-init.sh") | ||
execute_process(COMMAND chmod +x "${CMAKE_CURRENT_BINARY_DIR}/rustup-init.sh") | ||
execute_process(COMMAND "${CMAKE_CURRENT_BINARY_DIR}/rustup-init.sh" -y) | ||
|
||
set(ENV{PATH} "${_USER_HOME}/.cargo/bin:$ENV{PATH}") | ||
set(Rust_COMPILER ${_USER_HOME}/.cargo/bin/${RUSTC_NAME} PARENT_SCOPE) | ||
endif() | ||
else() | ||
message(STATUS "Rust is already installed, skipping.") | ||
set(Rust_COMPILER ${_USER_HOME}/.cargo/bin/${_RUSTC_NAME} PARENT_SCOPE) | ||
message(STATUS "Setting Rust Compiler to: ${Rust_COMPILER}") | ||
set(ENV{PATH} "${_USER_HOME}/.cargo/bin;$ENV{PATH}") | ||
endif() | ||
endfunction() |
Oops, something went wrong.