Can someone give me a sniblet of code


I am learning Rust but I need a simple example to build from :slight_smile:

  1. I need a webpage with a textbox and a button
  2. press the button and the text from the textbox goes to a file ( lets call it /var/www/html/yada.txt

That is all

thank you


There are a few web frameworks for Rust:

They will all manage to do what you want. They may seem a bit overwhelming if you just want one textbox, but they’re designed to support larger projects and that effort will pay off when you start writing bigger servers.


Thank you very much.

I will see what I can find out from this.

the project will never get bigger, it is in an environment that I have to submit my code, high security and this is what they call “thrid party”. I can steal a sniblet from it bit I can not use it .

Still would be great to see a sniblet to do those 3 things


Taken directly from Rocket tutorial: Exactly application you described.


that does it, thank you both very much

Have a Rusty day :slight_smile: