Skip to content

btholt/bazel_rust_wasm_azure_functions

 
 

Repository files navigation

Bazel + Rust + WASM + Azure = ❤️

How-to Bazel

  1. Install bazelisk from https://github.com/bazelbuild/bazelisk
  2. Build the app: bazelisk build //src:hello_world_wasm
  3. Run the app: bazelisk run //src:hello_world_wasm
  4. Run with logs: VERBOSE_LOGS=1 bazelisk run //src:hello_world_wasm --sandbox_debug
  5. View the deps graph: bazelisk query --noimplicit_deps 'deps(//src:hello_world_wasm)' --output graph | dot -Tpng > docs/graph.png

deps graph

Generate and deploy Azure Function

  1. Install the hexa CLI from https://hexa.run
  2. Generate a function project: hexa init --just=functions
  3. Review functions/wasmify/wasm_gen/index.ts and functions/wasmify/wasm_gen/wasm_loader.ts
  4. 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).

About

Compile Rust to WASM using Bazel and deploy to Azure Functions ⚡️

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 75.7%
  • Starlark 12.9%
  • TypeScript 6.1%
  • JavaScript 5.3%