server update, A new name, comments via firefish and lightmode

 2023-12-28

So client side update. We finally have support for the heresy known as "light mode". I am trying to figure out how to change the icon with the theme but I haven't figured that out yet. Webmentions support is happening very slowly but happening I have written a microservice for it but due to recent spam via webmentions I've been hesitant . I have an thought of an architecture like bellow, I'm not 100% on it yet but it is ready to deploy.

flowchart TD
    A[foxpost] -->|request to /webmention | B(push to postgresdb)
    B --> C[return 200]
    B --> D[webmention-handler]
    D --> E(process webmentions with microformats-rs)
    E --> F(push back to db)
    C --> G[request to post]
    G --> I[read mentions from db]

oh yeah I also now have access to mermaid charts! so yeah a lot of cool beans. In the meantime due to birdgy not working with firefish and after being inspired by a lot of others I've now got comments working via a javascript + css setup, I'm going to look into spinning it off into a drop in to be used by others as many projects like this already exist but as far as I've seen none work properly with firefish and misskey as getting a mastodon id from a note id is a chore that I'm personally not a fan off with this setup it works without any issues. I'm hoping that in the future I do figure out webmentions but until bridgy supports firefish or firefish fixes its api I'm probably going to keep it on a back burner, to be honest I don't have a lot faith in my microservice which is why I'm holding off.

On the back end I've dropped hcaptcha-rs in favor of making the requests myself. I only need a portion of hcapthca-rs and it worked out to a sizable gain in binary size dropping hcpatcha-rs and using reqwest to make the call myself. This is also why I have a important PSA: ENABLE RUSTLS-TLS WITH REQWEST IF YOU DON'T WANT OPENSSL not doing so will lead to well the rust binary being compiled with rustls but not tls support so you can't connect to https links. Along with this I've been messing with some cool stuff in terms of statically compiling rust.

I suspect due to some funkiness with libpq not supporting static linking the whole thing crashes on start with a SIGSEV. Theres also the possibility of not being able to DL_OPEN pthread. DL_OPEN pthread?? yeah, you read that right, quick side note because i want to, glibc has pthread a so thats dl opened when needed, in other words you can never actually 100% statically compile glibc applications which is why people use musl instead for statically compiling rust.

Over all I've been doing some exciting side projects along with working on the blog. Hopefully you guys find this interesting.

-- this is nullrequest signing off

Share on MastodonInstance URL (https://mastodon.example)




Comments

Comment on this blog post by publicly replying to this IceShrimp post using a Mastodon, or other ActivityPub/​Fediverse account. Known non-private replies are displayed below.