This is the reference code for this blog post, where I describe packing multiple services into one Rust binary.
# In frontend/
npm install
npm run buildNote: My special svelte.config.js and vite.config.ts files to have the static stuff work well.
Get yourself pebble from https://github.com/letsencrypt/pebble
You should save test/certs/pebble.minica.pem in this repo location as pebble.minica.pem (to be brought into the binary).
You can now run:
# From inside pebble/ dir (that you cloned with git)
./pebble -config pebble-config.json -strict=falseThen you can simply do:
cargo run # Brings in ./pebble.minica.pemTip 1: I found it easier to use the pebble binary directly, but I know you can also use Docker.
Tip 2: Current pebble version gives you an error (error: Order(Acme(Json(Error("unknown variant dns-account-01, expected one of http-01, dns-01, tls-alpn-01", line: 27, column: 33))))) with rustls-acme. I used pebble v2.5.1 to get around this.
Get the cert from https://127.0.0.1:15000/roots/0.
Convert to .crt:
openssl x509 -in FILE_IN -out FILE_OUTGo to Settings > Privacy & Security > Certificates > View Certificates > Import, then select and add your certificate.
