Rust Learning from Zero (23) —— The OwO software distribution system!

Although I've written a SSL management and distribution system, rcert, but the here immediately goes another problem: I still need to manually deploy the rcert, which is kind of frustrating. Or I can write some shell scripts to make this process automatically. Let's solve this (possibly) once and for all.

I built a handy (perhaps also buggy) software distribution system this time. This main purpose is of course to ease out the deployment process. And I'd like to call it OwO, because this emoji looks so nice and cool. Moreover, it should be able to deploy itself once I have the initial instance ran.

Basically, it will serve these pages and API endpoints below (let's take owo.ryza.moe as its domain)

URLCategoryAuthNotes
Homehttps://owo.ryza.moe/WebpageNo
Admin https://owo.ryza.moe/adminWebpageYesadmin is customisable
Sign Inhttps://owo.ryza.moe/signinWebpage APINo
Sign Outhttps://owo.ryza.moe/signoutWebpage APINo
Compile-time Static Fileshttps://owo.ryza.moe/static/{filename}Web ResourcesYesThese files are compiled into the final binary
Feature Imagehttps://owo.ryza.moe/feature_img/{img}Web ResourcesNoFeature Image for Specific Project
Install Scripthttps://owo.ryza.moe/{name}/install.shWeb ResourcesNoInstall Script for Specific Project
Project Resourceshttps://owo.ryza.moe/{name}/resources/{resource_name}Web ResourcesNoResources for Specific Project
Update Project Infohttps://owo.ryza.moe/update-dist-infoAPI EndpointYesPost
Upload Project Resourcehttps://owo.ryza.moe/upload-dist-resourceAPI EndpointYesPost, one file per request
Get Raw Install Scripthttps://owo.ryza.moe/raw-scriptAPI EndpointYesGet
Remove Project for Versionhttps://owo.ryza.moe/remove-distAPI EndpointYesPost
Remove Project Resourcehttps://owo.ryza.moe/remove-dist-resourceAPI EndpointYesPost

Once I had decided these rules, the next question was which http server crate should I use. I considered hyper, but let's try something else this time. Thus OwO uses actix_web as its http server framework.

Apparently, OwO will output dynamic webpages, so it needs an HTML template engine. After some googling, I chose ructe as the template engine to render dynamic webpages for OwO.

And here is the result of 3 days' coding!

You can visit the live instance of my OwO at https://owo.ryza.moe. And the code goes here: https://magic.ryza.moe/ryza/owo

One thought on “Rust Learning from Zero (23) —— The OwO software distribution system!”

Leave a Reply

Your email address will not be published. Required fields are marked *

5 × four =