Skip to content

Add Rust runtime blog: 3 things you can build#2980

Merged
atharvadeosthale merged 4 commits intomainfrom
rust-runtime-examples
May 11, 2026
Merged

Add Rust runtime blog: 3 things you can build#2980
atharvadeosthale merged 4 commits intomainfrom
rust-runtime-examples

Conversation

@atharvadeosthale
Copy link
Copy Markdown
Member

@atharvadeosthale atharvadeosthale commented May 7, 2026

Add blog for "3 things you can build with the Rust runtime"

@appwrite
Copy link
Copy Markdown

appwrite Bot commented May 7, 2026

Appwrite Website

Project ID: 69d7efb00023389e8d27

Sites (1)
Site Status Logs Preview QR
 website
69d7f2670014e24571ca
Failed Failed View Logs Preview URL QR Code

Website (appwrite/website)

Project ID: 684969cb000a2f6c0a02

Sites (1)
Site Status Logs Preview QR
 website
68496a17000f03d62013
Queued Queued View Logs Preview URL QR Code


Tip

Each function runs in its own isolated container with custom environment variables

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 7, 2026

Greptile Summary

This PR adds a new blog post introducing three Appwrite Functions examples written in the Rust 1.83 runtime: an image optimizer, a PDF invoice generator, and an HMAC-verified webhook receiver. The three previously raised issues (width=0 guard, full-payload PII logging, and the and_then/.map antipattern) have all been addressed in this revision.

  • Image optimizer: width == 0 guard returns a 400, image decoding uses .map(|r| r.decode()) correctly, and the log line includes only dimensions and byte counts.
  • Webhook receiver: logging now emits only the event name and payload size with an inline comment explaining the PII rationale.
  • PDF invoice generator: the page layout starts at y=215 mm and decrements 8 mm per row with no pagination — after ~27 items rows silently fall below the page boundary and disappear from the rendered PDF without any error signal.

Confidence Score: 4/5

Safe to merge once the PDF overflow issue is addressed or documented

The PDF invoice renderer uses a fixed y-coordinate that goes negative after ~26 items, silently clipping rows from the rendered output. Readers who copy the code into a production function will get truncated invoices with no error for any moderately-sized item list.

src/routes/blog/post/3-things-you-can-build-with-rust-runtime/+page.markdoc — the render_invoice function's page layout logic

Important Files Changed

Filename Overview
src/routes/blog/post/3-things-you-can-build-with-rust-runtime/+page.markdoc New blog post with three Rust function examples; previous issues (width=0 guard, PII logging, and_then antipattern) are addressed, but the PDF renderer silently clips rows beyond ~26 items with no error
.optimize-cache.json Cache file updated with new blog post and image entries; no logic changes

Reviews (4): Last reviewed commit: "Link to appwrite-community/rust-function..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@adityaoberai adityaoberai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, just ensure the example apps are tested

Also, please add them to a repo under https://github.com/appwrite-community

@atharvadeosthale atharvadeosthale merged commit dd1bb44 into main May 11, 2026
6 of 7 checks passed
@atharvadeosthale atharvadeosthale deleted the rust-runtime-examples branch May 11, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants