This is a simple email sending service used to deliver mails sent via the
contact form on mainmatter.com. It's written
in Rust using workers-rs
and runs
as a worker on
Cloudflare's edge infrastructure.
The project is based on the
template for worker-rs.
The main code is in the src/lib.rs
file.
The wrangler
package is used to run
the worker locally:
$ pnpm run dev
as well as to deploy a new version:
$ pnpm run deploy
Development works like with any other Rust crate, just tests must be run via
wasm-pack
as they run in a browser:
wasm-pack test --headless --chrome
workers-rs
(the Rust SDK for Cloudflare Workers used in this template) is
meant to be executed as compiled WebAssembly, and as such so must all the
code you write and depend upon. All crates and modules used in Rust-based
Workers projects have to compile to the wasm32-unknown-unknown
triple.
Read more about this on the
workers-rs
project README.
Copyright © 2022 Mainmatter GmbH (https://mainmatter.com), released under the Creative Commons Attribution-NonCommercial 4.0 International license.