Skip to content

An example app that uses a Wasm component (written in Rust) within an Elixir application

Notifications You must be signed in to change notification settings

tessi/wasmex_component_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Wasmex Example

In this example, we explore embedding a WebAssembly component in an Elixir application.

We have an Elixir application in wasmex_example which needs to generate a PDF. This PDF will be generated by a WebAssembly module written in Rust.

WebAssembly module

The wasmex_certificate_rust directory contains a Rust library for generating a certificate.

In there, you can run cargo component build to compile the component and use it in the Elixir application (or the browser).

Elixir application

The wasmex_example directory contains an Elixir application that uses this WebAssembly module.

To start the application, run mix generate_certificate && open certificate.pdf. It will run the built-in mix task, which in turn uses the Wasm component to generate the PDF and write it to the certificate.pdf file.

About

An example app that uses a Wasm component (written in Rust) within an Elixir application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published