-
Notifications
You must be signed in to change notification settings - Fork 0
Add wstd-azure crate for Azure SDK integration #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: wstd-azure
Are you sure you want to change the base?
Conversation
Co-authored-by: cataggar <87583576+cataggar@users.noreply.github.com>
Co-authored-by: cataggar <87583576+cataggar@users.noreply.github.com>
Co-authored-by: cataggar <87583576+cataggar@users.noreply.github.com>
Co-authored-by: cataggar <87583576+cataggar@users.noreply.github.com>
Co-authored-by: cataggar <87583576+cataggar@users.noreply.github.com>
|
@copilot, change target branch to be |
I cannot change the PR target branch directly as that's a GitHub interface setting. The target branch needs to be changed through the GitHub PR web interface. You can do this by:
The |
Cargo.toml
Outdated
| async-trait = "0.1" | ||
| axum = { version = "0.8.6", default-features = false } | ||
| azure_core = { version = "0.29", default-features = false } | ||
| azure_storage_blobs = { version = "0.21", default-features = false } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot this is the old crate. Instead, use azure_storage_blob. There are examples in the docs https://docs.rs/crate/azure_storage_blob/latest
There are also example to create a container and upload a blob in this test:
https://github.com/Azure/azure-sdk-for-rust/blob/main/sdk/storage/azure_storage_blob_test/src/lib.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use azure_storage_blob v0.6 instead of the deprecated azure_storage_blobs v0.21. Changes made in commit 1bacd67:
- Workspace dependency updated in Cargo.toml
- Dev-dependency updated in azure/Cargo.toml
- Example documentation updated to reference the correct crate name
The code compiles successfully for both native and wasm32-wasip2 targets.
Co-authored-by: cataggar <87583576+cataggar@users.noreply.github.com>
pchickey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like Copilot was able to do the easy part. This will need an integration test hooked up in test-programs/tests/azure_blob_storage.rs with the auth machinery working in CI.
Adds support for using the Azure Rust SDK on
wasm32-wasip2target via wstd's wasi-http interface.Implementation
Created
wstd-azurecrate following the pattern established in wstd-aws PR bytecodealliance#102, adapted for Azure SDK's architecture:typespec_client_core::async_runtime::AsyncRuntimemapping to wstd's task spawning (wstd::runtime::spawn) and timing (wstd::task::sleep)typespec_client_core::http::HttpClientusing wstd's wasi-http client, converting between Azure SDK types and wstd HTTP typesKey differences from AWS implementation:
typespec_client_coretraits vs AWS'saws-smithytraitstimecrate types vsstd::time::DurationBufResponse::from_bytes()vs streaming responsesUsage
Changes
Added
azure/workspace member with lib, README, and exampleWorkspace dependencies:
typespec_client_core,azure_core,azure_storage_blob(v0.6),async-traitReturns error for unsupported HTTP methods instead of silent fallback
Fixes add wstd-azure crate #1
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.