I have my idea for my first foray into a real Rust application. I am a Ruby and PHP programmer and this idea is related to the work I do in those languages. Most often PHP developers use Apache with mod_rewrite to route most things to a single file and then use frameworks which run extensive code just for routing and request handling before ever running the application code. Ever since I did some things with node.js and Express I’ve wanted to try embedding a Ruby or PHP interpreter in a good server platform like node and now Rust and offload all of the request handling, middleware, routing and master controller functions from the interpreted language to the server platform.
Basically there would be nothing left for the Ruby or PHP (or whatever language) to do but run the URL specified controller and action and load models, libs and views.
My question is, is there a good way to do non-blocking HTTP for this purpose in Rust so that I actually get a decent advantage to this approach? I need to at least give the interpreter I choose (or perhaps plug them in with an api) all the details about the request (cookies, parameters, uploaded files) and the controller and action to execute. It’s pretty easy to embed the Ruby interpreter, PHP is a big pain, Perl looks easy but in addition to my above question if anyone has any insight into embedding these please let me know. Who knows with this setup you could do a website in bash (okay I know that’s nuts).
I know this is going to be an adventure and just something to play with. If it works well who knows. I do love Rust so far.