-
-
Notifications
You must be signed in to change notification settings - Fork 36
refactor!: extract framework core to cot-core #444
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
Open
seqre
wants to merge
18
commits into
master
Choose a base branch
from
cot-core-reloaded
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
3c67ad5
create new crate
seqre ede952b
add basic types
seqre dc9a3c9
move error
seqre 7dd95c4
move body
seqre d9c96db
move headers
seqre f7b1f27
move html
seqre b4069e8
move json
seqre d5b74a2
move response
seqre afd5ceb
move request
seqre d84948d
move middleware
seqre 0c87698
move handler
seqre 0c36ac4
fixes
seqre 818e881
add body docs
seqre dd3c37a
remove no longer needed marker
seqre b1f9dc7
fix the build
m4tx 03595ce
hide private items
seqre f0bb420
upstream docs
seqre cb940a3
rebase fixes
seqre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| [package] | ||
| name = "cot_core" | ||
| version = "0.5.0" | ||
| description = "The Rust web framework for lazy developers - framework core." | ||
| categories = ["web-programming", "web-programming::http-server", "network-programming"] | ||
| edition.workspace = true | ||
| rust-version.workspace = true | ||
| license.workspace = true | ||
| homepage.workspace = true | ||
| repository.workspace = true | ||
| keywords.workspace = true | ||
| readme.workspace = true | ||
| authors.workspace = true | ||
|
|
||
| [lints] | ||
| workspace = true | ||
|
|
||
| [dependencies] | ||
| http.workspace = true | ||
| derive_more = { workspace = true, features = ["debug", "deref", "display", "from"] } | ||
| thiserror.workspace = true | ||
| serde.workspace = true | ||
| serde_json.workspace = true | ||
| backtrace.workspace = true | ||
| bytes.workspace = true | ||
| futures-core.workspace = true | ||
| http-body.workspace = true | ||
| http-body-util.workspace = true | ||
| sync_wrapper.workspace = true | ||
| axum.workspace = true | ||
| cot_macros.workspace = true | ||
| askama = { workspace = true, features = ["alloc"] } | ||
| tower-sessions.workspace = true | ||
| serde_path_to_error.workspace = true | ||
| indexmap.workspace = true | ||
| serde_html_form.workspace = true | ||
| form_urlencoded.workspace = true | ||
| tower.workspace = true | ||
| futures-util.workspace = true | ||
|
|
||
| [dev-dependencies] | ||
| async-stream.workspace = true | ||
| cot = { workspace = true, features = ["test"] } | ||
| futures.workspace = true | ||
| tokio.workspace = true | ||
|
|
||
| [features] | ||
| default = [] | ||
| json = [] | ||
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| //! Error handling types and utilities for Cot applications. | ||
| //! | ||
| //! This module provides error types, error handlers, and utilities for | ||
| //! handling various types of errors that can occur in Cot applications, | ||
| //! including 404 Not Found errors, uncaught panics, and custom error pages. | ||
|
|
||
| pub mod backtrace; | ||
| pub(crate) mod error_impl; | ||
| mod method_not_allowed; | ||
| mod uncaught_panic; | ||
|
|
||
| pub use error_impl::{Error, impl_into_cot_error}; | ||
| pub use method_not_allowed::MethodNotAllowed; | ||
| pub use uncaught_panic::UncaughtPanic; |
This file contains hidden or 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
This file contains hidden or 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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cot-core crate has a circular dev-dependency on the main
cotcrate. This creates a circular dependency structure wherecotdepends oncot_core, andcot_corehas a dev-dependency oncotfor tests. While this is technically allowed for dev-dependencies in Rust, it can complicate the build process and may cause issues with certain tools or workflows. Consider whether the tests in cot-core can be restructured to avoid depending on the main cot crate, or whether they can be moved to the main cot crate's test suite instead.