| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This allows for a separation of concerns between database backends and
Micropub, unless such backend have special requirements, like the file
backend storing children of a feed in an array.
|
|
|
|
|
|
|
| |
Axum still uses `async_trait`, let them do whatever they want. I will
no longer be subject to the humiliation of trying to dig through
lifetime errors and unreadable declarations. Also I don't fucking care
about MSRV, I'm not a library. If you don't have modern Rust, get one.
|
|
|
|
|
|
| |
The warnings only remain in places where I need them to remain,
because I either need a reminder to implement something, or I need to
refactor and simplify the code in question.
|
|
|
|
|
| |
Using `tokio::task::block_in_place` downgrades the thread temporarily
to avoid starvation.
|
| |
|
|
|
|
| |
Micropub types are now more coherent and gathered in one place.
|
|
|
|
|
|
|
|
| |
yes you can finally sign in
this is also supposed to show private posts intended for you!
maybe i can also reveal my email to those who sign in! :3
|
|
|
|
|
|
|
| |
I think I managed to not lose any functionality from my dependencies.
sqlparser remains unupgraded, but that's mostly because it is only
used in one example and it's not worth it to upgrade right now.
|
|
|
|
|
| |
Now the database objects can be uniformly created from a URI. They can
also optionally do sanity checks and one-time initialization.
|
|
|
|
| |
This makes the interface more consistent and resistant to misuse.
|
|
|
|
| |
Warning, untested. But hopefully works!
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Kittybox's source code is moved to a subfolder
- This improves build caching by Nix since it doesn't take changes
to other files into account
- Package and test definitions were spun into separate files
- This makes my flake.nix much easier to navigate
- This also makes it somewhat possible to use without flakes (but
it is still not easy, so use flakes!)
- Some attributes were moved in compliance with Nix 2.8's changes to
flake schema
|
| |
|
| |
|
|
|
|
| |
Now I will know if something breaks horribly again.
|
|
|
|
|
|
| |
Iterator::skip_while() returns the last item. Reimplement the
combinator that I need using a loop over Iterator::by_ref()
instead. This will terminate after the end is reached.
|
| |
|
|
|
|
| |
Closes #4.
|
|
|
|
|
|
|
|
|
| |
Templates and utility types are now separate crates to speed up
compilation, linting and potential reuse/replacement.
Potentially more crates could be split out/modularized, resulting in
speedups, smaller binaries (whenever features are excluded) and even
more reuse capabilities.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Reads don't lock anymore. At all.
- Writes create a temporary file and use `rename(2)` to atomically
replace it
- since OpenOptions::create_new(true) is used, tempfile creation is
atomic (and since tempfile names are per-post, a post can only be
edited by one request at a time)
- Since written files get atomically replaced, readers can't read a
corrupted file
Potential pitfalls:
1. This approach is not covered by unit tests (yet)
2. Stale tempfiles can prevent editing posts (can be solved by
throwing out tempfiles that are older than, say, a day)
3. Crashed edits can leave stale tempfiles (honestly that sounds
better than corrupting the whole database, doesn't sound like a bug to
me at all!)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Warp allows requests to be applied as "filters", allowing to flexibly
split up logic and have it work in a functional style, similar to
pipes.
Tokio is just an alternative runtime. I thought that maybe switching
runtimes and refactoring the code might allow me to fish out that
pesky bug with the whole application hanging after a certain amount of
requests...
|
|
|
|
|
|
| |
This is to prevent spinning in a loop waiting for a lock. This hangs
often, though I suspect this should have been fixed in the previous
commit.
|
|
|
|
|
|
|
| |
This may or may not be the cause for the app hanging while waiting for
a lock. Now the operations with locks are never performed over an
async boundary, excluding any shenanigans that can happen when
accidentally leaving a file locked over async boundaries.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This will allow readers to view private posts intended just for them.
Additionally fixed bugs in patterns due to which webmentions might not
have been sent.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Thanks to @Kloenk I was able to get rid of the unsafety and
tell the compiler how to properly check what I needed for
the StorageError to be declared thread-safe.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
When an error is found, the site name passed to Storage::get_setting
in the error handler is incorrect. The ASCII serialisation of the
hostname should get used.
|
| |
|
| |
|
|
|
|
|
| |
BufReader was really unneccesary here, since I was batch-reading all
of this in one go.
|
|
|
|
|
|
| |
Now symlink creation works on Windows and creates links relative to
the posts, allowing for seamless migrations of the backing directory
for true portability and no data lock-in.
|
| |
|