{"id":21923221,"url":"https://github.com/deislabs/azure-sdk-for-rust-wasi-samples","last_synced_at":"2025-03-22T11:16:48.648Z","repository":{"id":96911612,"uuid":"363262767","full_name":"deislabs/azure-sdk-for-rust-wasi-samples","owner":"deislabs","description":null,"archived":false,"fork":false,"pushed_at":"2021-05-01T05:00:34.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-16T02:08:58.870Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deislabs.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-30T21:27:11.000Z","updated_at":"2022-01-06T16:52:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"f1fcccd3-7fe3-413a-88f3-ade15fee3cfa","html_url":"https://github.com/deislabs/azure-sdk-for-rust-wasi-samples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fazure-sdk-for-rust-wasi-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fazure-sdk-for-rust-wasi-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fazure-sdk-for-rust-wasi-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deislabs%2Fazure-sdk-for-rust-wasi-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deislabs","download_url":"https://codeload.github.com/deislabs/azure-sdk-for-rust-wasi-samples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244945626,"owners_count":20536297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T21:09:45.424Z","updated_at":"2025-03-22T11:16:48.642Z","avatar_url":"https://github.com/deislabs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Using Azure services from WASI modules\n\nThis repo contains samples for using the [Azure Rust SDK][rust-sdk] from WASI\nmodules, using the [`wasi-experimental-http`][wasi-experimental-http] crate. The\nsamples are slightly modified versions of those from the [upstream SDK\nrepository][rust-sdk]. Note that not all SDKs are compilable to `wasm32-wasi`,\nand this repo should be updated as more compatible SDKs are added.\n\nThe _very_ early work in progress can be tracked [here][fork].\n\n### Building\n\n```\n$ cargo target add wasm32-wasi\n$ cargo build --target wasm32-wasi --release --bin blob\n$ cargo build --target wasm32-wasi --release --bin cosmos\n$ cargo build --target wasm32-wasi --release --bin eventgrid\n$ cargo build --target wasm32-wasi --release --bin iothub\n```\n\nAt this point, the easiest way to test the resulting module is to execute it\nusing the helper binary that can be found [here][bin]:\n\n```\n$ wasmtime-http target/wasm32-wasi/release/blob.wasm --env STORAGE_MASTER_KEY=\u003cmaster-key\u003e --env STORAGE_ACCOUNT=\u003cstorage-account\u003e -a https://\u003cstorage-account\u003e.blob.core.windows.net\n\n$ wasmtime-http target/wasm32-wasi/release/cosmos.wasm --env COSMOS_MASTER_KEY=\u003cmaster-key\u003e --env COSMOS_ACCOUNT=\u003ccosmos-account\u003e -a https://\u003ccosmos-account\u003e.documents.azure.com\n\n$ wasmtime-http target/wasm32-wasi/release/eventgrid.wasm --env TOPIC_HOST_NAME=\u003cfull-topic-hostname\u003e --env TOPIC_KEY=\u003ctopic-key\u003e -a https://\u003ctopic\u003e.\u003clocation\u003e.eventgrid.azure.net\n\n$ wasmtime-http target/wasm32-wasi/release/iothub.wasm --env IOTHUB_CONNECTION_STRING=\u003cconnection-string-in-quotes\u003e -a https://\u003ciothub-account\u003e.azure-devices.net\n```\n\n[rust-sdk]: https://github.com/Azure/azure-sdk-for-rust\n[wasi-experimental-http]: https://github.com/deislabs/wasi-experimental-http/\n[bin]: https://github.com/deislabs/wasi-experimental-http/pull/57\n[fork]:\n  https://github.com/radu-matei/azure-sdk-for-rust/tree/enable-wasi-experimental-http\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeislabs%2Fazure-sdk-for-rust-wasi-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeislabs%2Fazure-sdk-for-rust-wasi-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeislabs%2Fazure-sdk-for-rust-wasi-samples/lists"}