tiffany352 / rink-rs

Unit conversion tool and library written in rust
https://rinkcalc.app/about
GNU General Public License v3.0
441 stars 28 forks source link

Rink-web 3 #165

Closed tiffany352 closed 5 months ago

tiffany352 commented 5 months ago

Kind of silly that I'm already on the third iteration of the website. But the previous one was a bit over-engineered and hard to maintain. I actually can't even get it to compile anymore, it errors out while trying to build the wasm binary.

So it was either migrate from sapper (which is deprecated and broken) to svelte-kit (the successor to sapper), or to simplify. I simplified.

The new tech jenga tower is:

Rink's website will now be completely static, so operating it is easier. The javascript and wasm is quarantined to the index page where a rink repl is active, the other pages are plain html.

The currency fetching is now a totally separate piece of code from the website. It makes it simpler and requires less code to be loaded during the regular cron job.

The javascript is way simpler now. It only manipulates the part of the page that need to be dynamic. It also uses the token format machinery instead of directly converting rink's output AST to html.

Pros:

Cons:

Todo:

Screenshots

REPL

image

About page

image

tiffany352 commented 5 months ago

Site is live at https://rinkcalc.app now.