thoughts (03)
Rust, Docker, and the GHA layer caching problem
Lately I’ve been working on my own vibe-designed todo app rewrite in Rust1. Along the way I started looking for a sensible path to optimizing Docker image builds on GitHub Actions.
One of the solutions you can easily stumble upon is cargo-chef — it separates dependency fetching from building the actual code to better cache layers. The problem is it’s designed for simpler applications with a single lib.rs. In a workspace with more crates it doesn’t cache what it should, and every push ends up recompiling everything from scratch.
Two approaches I tried: buildkit cache dance2 — speeds things up a bit, but doesn’t cache brilliantly and adds its own time overhead3 — and swatinem/rust-cache, which works nicely on GHA for binary caching, but deploying Kartoteka as a Docker image on Coolify rules that action out.
Research turned up sccache as worth trying — I made an attempt, but Hetzner S3 is a no-go4. So Cloudflare R2 on the free tier as a potential alternative5.
For now I’m parking at cache dance. Not ruling out going toward my own runner with local cache — just on a slightly bigger server.
Footnotes
-
Kartoteka — somewhere between Todoist, Jira, Amazing Marvin, and Toggl. Classic scope creep. ↩
-
In Kartoteka’s case there’s also the exotic stack — Leptos — which means deploying the server binary together with the built frontend/wasm. ↩
-
Hetzner S3 bills storage in 1 TB blocks. A bit astronomical for one innocent backup and build artifacts. ↩
-
Yes, I know — suggesting I go back to Cloudflare when I’ve spent two weeks rewriting an MCP from a Cloudflare Worker to axum/rmcp specifically to get off the Cloudflare ecosystem, sure. ↩
How to improve Zotero experience?
It’s an old note, just for archival purposes. There might be newer alternatives. Also, old blog template used another method of referencing urls, don’t have it yet here, so leaving it as-is: link
I have a need to share how much I love Zotero. It was a tool that was a significant part of my academic journey and I had fallen in love while I was writing my B.Sc. thesis1, and all coexisting add-ons were indirectly responsible for about 50 references mentioned. I’ve recently also incorporated Zotero into my workflow alongside another side-project on Notion.
Other remarkable features that Zotero offers:
- Awesome notes on existing PDFs. A bit better than hypothes.is2 what was my main driver in B.Sc. era for taking notes from PDFs.3
- Collection mechanism - it’s a bit specific approach for zotero and needs time to be used to.
- Group collections that you can share your findings in teams.4
What add-ons were helpful?
Firefox extension
Zotero Connector for Firefox simplifies the process of adding new database entries. A single click can trigger metadata extraction, and in some cases, even full-text PDF retrieval.5
Better Bibtex
Better Bibtex allows exporting yours database in format compatible with Latex.
Only Latex?
If you need a place to take notes and mention/link your entries, Obsidian might be a good place to start. There is a great tutorial that was a great inspiration, available here.
There is a newer approach, however, that might work a bit better - Obsidian Zotero Plugin. Haven’t tested yet.
But what if I want to share my zotero-based entries with friends?
Sometime tool just doesn’t suit well, and forcing others to use obsidian might be imposing useless cognitive overload, so then Notion comes into play with notero extension. Works surprisingly smooth.
To wrap up, there are more efficient workflows than relying solely on a Word database or gathering references in a single designated file. And they may be integrated with your favorite applications
Footnotes
-
That’s the one tag which supposedly is a river and doesn’t match to other apps listed. ↩
-
Zotero has much more colors to highlight text. ↩
-
While PDF support in Zotero is superior, I was mainly taking notes from websites where hypothesis were better. Look in further sources section for great review of note-taking tools. ↩
-
Sharing is caring, or something like that. ↩
-
I was thinking if there may be an extension using other, less legal sources. Yep, they exist. ↩
Implication of deploying github page to another repo
Be aware that it is a n old post. Just reference or an inspiration if someone is lost.
Years ago I had a thought to seperate repo with hugo theme and the one with rendered page due to possible use of utterances1. There are my experiences with both approaches:
deploying page to the same repo
- Astro docs provides a good starting point
deploying site elsewhere
- There is a a convinient github-action
- Can you reuse
withastro/action@v0to build it? You might, but it is designed for scenario above, this action creates an artifact that is consumed byactions/deploy-pages@v1action.- tl;dr: there are better ways
Example of deploying astro blog to github pages
There is my example of working github action.
Things worth to note:
- By using actions to install node and pnpm there is huge time savings due to caching.
- There should be a
.nojekyllfile in blog root - otherwise css is messed up2