Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manekinekko/bazel_rust_wasm_azure_functions
Compile Rust to WASM using Bazel and deploy to Azure Functions ⚡️
https://github.com/manekinekko/bazel_rust_wasm_azure_functions
Last synced: 27 days ago
JSON representation
Compile Rust to WASM using Bazel and deploy to Azure Functions ⚡️
- Host: GitHub
- URL: https://github.com/manekinekko/bazel_rust_wasm_azure_functions
- Owner: manekinekko
- License: mit
- Created: 2020-02-06T09:34:03.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-20T22:27:23.000Z (almost 2 years ago)
- Last Synced: 2024-10-05T11:37:41.136Z (about 1 month ago)
- Language: Rust
- Homepage: https://wasmify.azurewebsites.net/api/wasm_gen
- Size: 1.22 MB
- Stars: 9
- Watchers: 3
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
[![](https://img.shields.io/badge/Open%20in-VS%20Codespaces-blue)](http://env.new/?name=wasm-bazel&repo=manekinekko/bazel_rust_wasm_azure_functions)
# Bazel + Rust + WASM + Azure = ❤️
## How-to Bazel
1. Install `bazelisk` from https://github.com/bazelbuild/bazelisk
1. Build the app: `bazelisk build //src:hello_world_wasm`
1. Run the app: `bazelisk run //src:hello_world_wasm`
1. Run with logs: `VERBOSE_LOGS=1 bazelisk run //src:hello_world_wasm --sandbox_debug`
1. View the deps graph: `bazelisk query --noimplicit_deps 'deps(//src:hello_world_wasm)' --output graph | dot -Tpng > docs/graph.png`![deps graph](https://github.com/manekinekko/bazel_rust_wasm_example/blob/master/docs/graph.png)
## Generate and deploy Azure Function
1. Install the `hexa` CLI from https://hexa.run
1. Generate a function project: `hexa init --just=functions`
1. Review [functions/wasmify/wasm_gen/index.ts](./functions/wasmify/wasm_gen/index.ts) and [functions/wasmify/wasm_gen/wasm_loader.ts](./functions/wasmify/wasm_gen/wasm_loader.ts)
1. Deploy the function app: `hexa deploy`## Credits
This project uses a public list of nouns and adjectives found on this project: https://github.com/fnichol/names/tree/master/data. Please send a PR if you would like to remove any of the offensive adjectives or nouns (I will merge them immediately).