-
Notifications
You must be signed in to change notification settings - Fork 328
Port to Tokio 0.2 #307
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
Closed
Closed
Port to Tokio 0.2 #307
Changes from all commits
Commits
Show all changes
128 commits
Select commit
Hold shift + click to select a range
d67ec8f
isolate core revamp
prasannavl a50668f
Merge pull request #219 from prasannavl/2019_05_tide_isolate_core
prasannavl a376d60
Fix example link in readme
daleione c3066f7
Merge pull request #221 from daleione/readme
prasannavl be577ef
fix broken links in readme
prasannavl f4473d6
Rename `serve` to `run`, add asynchronous `serve`
tirr-c 6078fc4
Run rustfmt
tirr-c 059a8f8
add tide-compression crate
fairingrey 77dd922
Merge pull request #203 from tirr-c/serve-future
fairingrey 250c2b9
Merge remote-tracking branch 'upstream/master' into compression
fairingrey 80f0af6
use run instead of serve
fairingrey 962fddc
Update tide-compression/README.md
fairingrey b19eb2e
Check example in readme compiles during testing
Nemo157 3af12d9
Remove #[allow(unused_mut)]
taiki-e f7ba837
Merge pull request #229 from Nemo157/test-readme
fairingrey dac4493
Remove #[allow(unused_mut)] (#231)
fairingrey 29cdf99
Merge remote-tracking branch 'upstream/master' into compression
fairingrey d64d063
Middleware-based compression and decompression (#194)
fairingrey 4531977
Improve curl command consistency
pickfire bdc9fdf
Improve curl command consistency (#233)
fairingrey 77b3a1c
Split tide into smaller crates (#220)
85b85e9
Update travis configuration (#228)
Nemo157 e7a7dac
add tide-log
prasannavl 1106a85
change deny attr to warn; consistent enforcement for all crates
prasannavl 2878aba
Add ResultDynErrExt (#216)
updogliu 4d6da98
remove remaining deny attrs
prasannavl 011d0db
rename trait ExtractForms to ContextExt (#239)
fairingrey 6637aaf
remove async box macro
yoshuawuyts e7703fd
rustfmt
yoshuawuyts 4806db4
Fix broken links in readme (#242)
daleione 114c17c
Sweep the cache before uploading it (#246)
Nemo157 0d8caa9
move tide/ to src/
yoshuawuyts e11f71a
fix examples
yoshuawuyts 15eee77
fix tests
yoshuawuyts 7a8a33b
remove certificate
yoshuawuyts 3799be6
remove async box macro (#245)
fairingrey e30f184
remove `--manifest-path`
fairingrey 731e27a
Merge branch 'master' into run-examples
fairingrey 5ec263e
Bring tide to root, and allow `cargo run --example` (#247)
fairingrey 4df808d
add tide-log (#222)
prasannavl d664194
remove certificate file (#248)
fairingrey 4bd12ed
Merge branch 'master' into 2019_change_quality_enforcement
fairingrey 79e37d8
Adjust code quality enforcement (#241)
fairingrey a9fbc58
feat: add type annotation
k-nasa 424c605
fix clippy warnings (#249)
fairingrey e45a7e5
Update .travis.yml
fairingrey 1a93fc2
Update juniper requirement from 0.11.1 to 0.12.0
dependabot-support 8b06916
isolate tide-headers, tide-slog; better; improve loggers
prasannavl 225a43d
add logging examples
prasannavl 9e96166
Merge branch 'master' of ssh://github.com/rustasync/tide
prasannavl 7d9e136
cargo fmt
prasannavl 8aac219
add tide dev-dep to all crates
prasannavl f41754b
fixup manifest documentation links
prasannavl b47e780
pub use ResultDynErrExt in tide::error
updogliu 476d75b
Update Cargo.toml
fairingrey f354835
capitalize Tide in crate desc
fairingrey 82e990c
Core revamp part 2 (#252)
fairingrey d401db3
pub use ResultDynErrExt in tide::error (#253)
fairingrey 34cb65c
refactor tide-forms, tide-querystring
prasannavl 5c483ba
Fix the documentation for wildcards for path definitions to match imp…
60834dc
fix err_fmt macro
prasannavl d187372
fix querystring tests
prasannavl 676132e
add basic crate level doc
prasannavl d15bb7a
cargo fmt
prasannavl c121673
Fix links in README
richard-uk1 8ac86ec
fix tide-slog keywords limit
prasannavl 68c6cb7
Fix links in README (#256)
prasannavl ce2167a
Rename Context<Data> to Context<State>
Maniarr 8b667fe
Merge pull request #260 from Maniarr/appdata_rename
fairingrey 4d4ef6c
Merge branch 'master' into core_revamp_3
fairingrey 32709f5
Merge pull request #254 from gameldar/master
fairingrey 9fbd88f
propagate hyper error on serve failure
fairingrey d18c369
Core revamp part 3 (#255)
fairingrey 3a0e592
Merge pull request #261 from fairingrey/propagate_hyper_error
fairingrey 279e0f0
Add doc comment (#250)
k-nasa 7c2046a
add test that checks for empty body on HEAD req (#179)
fairingrey 2504828
Add middleware for catching panics (#265)
Nemo157 1fb4ab3
Implemented CORS header handler middleware (#262)
k-nasa 4486ba0
Add templating example with tera (#267)
milesgranger a803151
Update lib.rs
fairingrey 994ee1c
reduce redundancy in docs and make consistent (#272)
fairingrey ae89265
Workaround for issue #278: works around Rust internal compiler error.
realcr f0d667d
Added a comment explaining the workaround for solving issue 278.
realcr 1505f91
Bumped rust version in .travis.yml to nightly-2019-06-02.
realcr 4bc805b
cargo fmt
realcr e4fcb6c
Merge pull request #279 from realcr/master
tirr-c 8f80e0c
Core isolation - part 4 (#258)
prasannavl 2e063ae
Add example running on top of runtime (#283)
Nemo157 a74cc28
Disable default-features everywhere (#282)
Nemo157 d17b4f0
Update for futures alpha.17 (#286)
Nemo157 25de413
Rewrite tide-slog to setup a per-request logger instance and support …
Nemo157 36c15fd
Add async_closure feature gate where needed (#288)
spastorino e63086a
Remove usage of async_closure
taiki-e ff9731c
Remove usage of async_closure (#289)
fairingrey 3eb630f
Set StatusCode for an empty response from `()` to `204`
mehcode eed3041
Merge pull request #285 from mehcode/patch-1
7e2adb3
Add doc example showing query parameter extraction
phansch f269183
Merge pull request #291 from phansch/query_pairs_example
b77a242
Update juniper requirement from 0.12.0 to 0.13.0
dependabot-preview[bot] 9a9b10a
Cors middleware extension (#275)
k-nasa 3a7601f
Update percent-encoding requirement from 1.0.1 to 2.0.0
dependabot-preview[bot] dfef176
remove http-service patches (#297)
yoshuawuyts 738c870
Update serde_urlencoded requirement from 0.5.5 to 0.6.0
dependabot-preview[bot] dd0bcfe
querystring: replace dependency serde_urlencoded with serde_qs (#299)
7dfb4b8
Fix clippy error in static file example
dvic d0b1ed8
Merge pull request #303 from dvic/patch-1
702e0f4
removed existential_type feature
ibaryshnikov a407732
updated route-recognizer to 0.1.13
ibaryshnikov 25581ae
added patch.crates-io for runtime
ibaryshnikov c815f72
updated toolchain to nightly-2019-07-29
ibaryshnikov cd201eb
updated toolchain to nightly-2019-07-31 because of missing rustfmt
ibaryshnikov e5730ca
Merge pull request #301 from ibaryshnikov/master
ibaryshnikov 369faff
Fix tide-slog docs.rs metadata
Nemo157 2c15f83
Merge pull request #310 from rustasync/tide-slog-docrs
Nemo157 23b8719
Upgrade mime_guess to version 2.0.1 (#308)
958f2a7
Bump http-service dependency in tide-panic, set CI to nightly-2019-08…
vorot93 c41ed84
Update slog-stdlog to 4.0 (#314)
taiki-e 336c6ef
CORS middleware: no origin header should be treated as an empty origi…
f56a27d
CORS middleware: update test
87807a7
CORS middleware: fix clippy
67e9191
Merge pull request #318 from Ivshti/master
tirr-c af0b900
updated runtime to 0.3.0-alpha.7, removed patch for crates.io (#319)
ibaryshnikov e38eb38
Update env_logger requirement from 0.6.1 to 0.7.0
dependabot-preview[bot] 8281f38
Update juniper requirement from 0.13.0 to 0.14.0
dependabot-preview[bot] de9f51e
Port to Tokio 0.2
vorot93 a69d98d
Remove external docs so as to build on beta
vorot93 9f9bdd6
Remove feature flag
vorot93 2a9dede
Cut the runtime example for now
vorot93 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
There are no files selected for viewing
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 |
|---|---|---|
| @@ -1,13 +1,56 @@ | ||
| language: rust | ||
| rust: | ||
| - nightly-2019-05-09 | ||
|
|
||
| before_script: | | ||
| rustup component add rustfmt clippy | ||
| script: | | ||
| cargo fmt --all -- --check && | ||
| cargo clippy --all -- -D clippy::all && | ||
| cargo build --no-default-features --verbose && | ||
| cargo build --all --verbose && | ||
| cargo test --all --verbose | ||
| cache: cargo | ||
| rust: beta | ||
|
|
||
| before_script: | ||
| - > | ||
| [[ "$(cargo-sweep --version)" == "cargo-sweep 0.4.1" ]] | ||
| || cargo install cargo-sweep | ||
| - cargo sweep --stamp | ||
|
|
||
| before_cache: | ||
| - cargo sweep --file | ||
|
|
||
| matrix: | ||
| include: | ||
| - name: cargo doc | ||
| env: [CACHE_NAME=docs] | ||
| script: | ||
| - RUSTDOCFLAGS=-Dwarnings cargo doc | ||
| --all --all-features | ||
| --exclude tide | ||
| --no-deps | ||
|
|
||
| - name: cargo fmt | ||
| cache: false | ||
| before_script: [] | ||
| install: | ||
| - rustup component add rustfmt | ||
| script: | ||
| - cargo fmt --all -- --check | ||
|
|
||
| - name: cargo clippy | ||
| env: [CACHE_NAME=clippy] | ||
| install: | ||
| - rustup component add clippy | ||
| script: | ||
| - cargo clippy | ||
| --all --all-targets | ||
| -- -Dwarnings | ||
|
|
||
| - name: cargo build --no-default-features | ||
| env: [CACHE_NAME=no-default-features] | ||
| script: | ||
| - cargo build | ||
| --manifest-path tide-core/Cargo.toml | ||
| --no-default-features | ||
| - cargo build | ||
| --no-default-features | ||
|
|
||
| - name: cargo test | ||
| script: | ||
| - cargo test --all --verbose | ||
|
|
||
| - name: cargo test --all-features | ||
| script: | ||
| - cargo test --all-features | ||
| - cargo test --manifest-path tide-slog/Cargo.toml --all-features |
This file was deleted.
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
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 |
|---|---|---|
| @@ -1,14 +1,13 @@ | ||
| #![feature(async_await)] | ||
|
|
||
| use tide::Context; | ||
|
|
||
| async fn echo_path(cx: Context<()>) -> String { | ||
| let path: String = cx.param("path").unwrap(); | ||
| format!("Your path is: {}", path) | ||
| } | ||
|
|
||
| fn main() { | ||
| #[tokio::main] | ||
| async fn main() { | ||
| let mut app = tide::App::new(); | ||
| app.at("/echo_path/*path").get(echo_path); | ||
| app.serve("127.0.0.1:8000").unwrap(); | ||
| app.serve("127.0.0.1:8000").await.unwrap(); | ||
| } |
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 |
|---|---|---|
| @@ -1,30 +1,26 @@ | ||
| #![feature(async_await)] | ||
|
|
||
| use cookie::Cookie; | ||
| use tide::{cookies::ContextExt, middleware::CookiesMiddleware, Context}; | ||
|
|
||
| /// Tide will use the the `Cookies`'s `Extract` implementation to build this parameter. | ||
| /// | ||
| async fn retrieve_cookie(mut cx: Context<()>) -> String { | ||
| format!("hello cookies: {:?}", cx.get_cookie("hello").unwrap()) | ||
| } | ||
|
|
||
| #[allow(unused_mut)] // Workaround clippy bug | ||
| async fn set_cookie(mut cx: Context<()>) { | ||
| cx.set_cookie(Cookie::new("hello", "world")).unwrap(); | ||
| } | ||
|
|
||
| #[allow(unused_mut)] // Workaround clippy bug | ||
| async fn remove_cookie(mut cx: Context<()>) { | ||
| cx.remove_cookie(Cookie::named("hello")).unwrap(); | ||
| } | ||
|
|
||
| fn main() { | ||
| #[tokio::main] | ||
| async fn main() { | ||
| let mut app = tide::App::new(); | ||
| app.middleware(CookiesMiddleware::new()); | ||
|
|
||
| app.at("/").get(retrieve_cookie); | ||
| app.at("/set").get(set_cookie); | ||
| app.at("/remove").get(remove_cookie); | ||
| app.serve("127.0.0.1:8000").unwrap(); | ||
| app.serve("127.0.0.1:8000").await.unwrap(); | ||
| } |
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,25 @@ | ||
| use http::header::HeaderValue; | ||
| use tide::middleware::{CorsMiddleware, CorsOrigin}; | ||
|
|
||
| #[tokio::main] | ||
| async fn main() { | ||
| let mut app = tide::App::new(); | ||
|
|
||
| app.middleware( | ||
| CorsMiddleware::new() | ||
| .allow_origin(CorsOrigin::from("*")) | ||
| .allow_methods(HeaderValue::from_static("GET, POST, OPTIONS")), | ||
| ); | ||
|
|
||
| app.at("/").get(|_| async move { "Hello, world!" }); | ||
|
|
||
| app.serve("127.0.0.1:8000").await.unwrap(); | ||
| } | ||
|
|
||
| // You can test this by running the following in your browser: | ||
| // | ||
| // ```console | ||
| // $ fetch("http://127.0.0.1:8000") | ||
| // ``` | ||
| // | ||
| // You will probably get a browser alert when running without cors middleware. |
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.
Is this still needed? I believe we already published updated versions right?
Uh oh!
There was an error while loading. Please reload this page.
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.
If you look closely, this actually depends on the branch. Specifically, this one:
http-rs/http-service#43
Besides, that branch depends upon git
hyperanyway.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.
0.3.1was supposed to release earlier, but I only got it done today after seeing http-rs/http-service#45Is there a reason we aren't using overrides for the Git dependencies in this branch? (Seems that would prevent issues with publishing, but correct me if I'm wrong.)
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.
Not sure -- Git deps can't be published to crates.io either way.