framesurge / perseus

A state-driven web development framework for Rust with full support for server-side rendering and static generation.
https://framesurge.sh/perseus/en-US
MIT License
2.15k stars 89 forks source link

Create capsules system and rewrite just about everything #224

Closed arctic-hen7 closed 1 year ago

arctic-hen7 commented 1 year ago

This creates the capsules system as per #4.

This will take a while before it's completely ready!

Closes #4.

arctic-hen7 commented 1 year ago

Following the unceremonious destruction of the delayed state system once I realized it was a terrible ideas, I've introduced delayed widgets, which allow a very similar effect, except the state that you want to delay is broken out into a separate widget. (Terminology: template -> page as capsule -> widget.)

arctic-hen7 commented 1 year ago

Hypothetically, tests should be passing now. Any failures are either CI bugs or genuine errors, I think!

Famous last words, clearly. I think most of these are actually a CI bug though...

arctic-hen7 commented 1 year ago

There's a very odd issue on CI at the moment to do with wasm-opt versions not being able to be parsed, so I'm running the tests locally for now.

arctic-hen7 commented 1 year ago

No matter what CI says, all tests are now passing (including doctests and usual checks).

arctic-hen7 commented 1 year ago

Basic capsules functionality is now ready, and I'm just adding some further examples/tests for request-time behaviors like revalidation and incremental generation of widgets. Once that all works, there's still one thing I want to improve with incremental widget rendering to avoid an unnecessary build reschedule, and then this will be ready to merge!