-
-
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
20
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
20 commits
Select commit
Hold shift + click to select a range
b3da91c
create new crate
seqre 665082c
add basic types
seqre 383b9f5
move error
seqre a6dd5f8
move body
seqre 9dee0ae
move headers
seqre 2da6c5d
move html
seqre 725f180
move json
seqre a4fa150
move response
seqre 2994eca
move request
seqre 266214e
move middleware
seqre c1c890a
move handler
seqre ead28ff
fixes
seqre d13c649
add body docs
seqre 9b372af
remove no longer needed marker
seqre 0536013
Merge branch 'master' into cot-core-reloaded
seqre ce1c634
Merge branch 'master' into cot-core-reloaded
seqre cec103e
fix the build
m4tx 3aecce1
Merge branch 'master' into cot-core-reloaded
seqre ea496f2
hide private items
seqre b3e3be5
upstream docs
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.4.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.