-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Axum integration #146
Merged
Merged
Add Axum integration #146
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sycamore v0.8 only runs on Rust 2021.
Still have to do: - `router/` - `template/` - `shell.rs` - One tricky error in `error_pages.rs`
I removed the troublesome function in `error_pages.rs`, so that may bite me soon.
Still have problems with `bind:value` (as we will in all the state platform examples for now).
The remaining errors will be fixed after `make_rx` can work with non-`Rc` `Signal`s.
Nothing works without hydration disabled though...
This *should* make the state platform work with lifetimes.
I have been shown a much better way of achieving the same outcome.
It will be easier to manually undo changes to make sure we preserve some good things. This reverts commit 15187b5.
This avoids a huge number of lifetime issues, and actually ends up being more performant, without compromising on ergonomics.
This should make Perseus several orders of magnitude more ergonomic, in line with Sycamore's new no-clones system!
This requires an irritating change to import practices unfortunately, but the convenience and ergonomics are worth it.
This also involved some minor changes to the macros to fix some nested state issues.
This improves ergonomics and makes the auth example compile.
* refactor: simplify provide_context_signal_replace Also slightly improves performance in only making a single call to use_context * fix: do not insert hydration keys in the head string * chore: remove perseus/hydrate feature from Cargo.toml * chore: merge imports for consistent code style * fix: update sycamore to v0.8.0-beta.5 and remove workaround Co-authored-by: arctic_hen7 <arctic_hen7@pm.me>
These were just for the demos that weren't ready at the time of the PR.
Hydration still doesn't work in the `auth` example.
This is all untested as yet, but everything *should* work.
This should fix the issues with the `body` element.
Also locked the old v0.3.4-5 docs to a specific commit hash, which keeps the examples there safe to use.
This favors `main` fully.
There are still some issues with shared state though that make this completely unusable.
No clue why using extensions didn't work, but now we're using closure captures, which are compile-time checked anyway.
This branch was created halfway through the update to the latest Sycamore version, hence the obscene number of commits. There are actually very few changes in here! |
Just some simple errors made this fail. Hopefully, all tests should now pass...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for a third integration to Perseus, introducing a new package,
perseus-axum
. This integration has the exact same capabilities as the other two, but it will allow easier integration with existing Axum systems for those working with the lower levels of Perseus, as well as greater support for integrating Axum systems into Perseus when custom API routes are supported.Closes #133.