-
Notifications
You must be signed in to change notification settings - Fork 687
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
rust: bump ohkami to v0.21 #8180
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
framework: | ||
github: ohkami-rs/ohkami | ||
version: 0.21 | ||
engines: | ||
- nio |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,14 @@ | ||||||||||
[package] | ||||||||||
name = "server" | ||||||||||
version = "0.0.0" | ||||||||||
edition = "2021" | ||||||||||
publish = false | ||||||||||
|
||||||||||
[profile.release] | ||||||||||
lto = true | ||||||||||
panic = "abort" | ||||||||||
codegen-units = 1 | ||||||||||
Comment on lines
+7
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They're quite standard optimizations for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. now almost all [profile.release]
opt-level = 3
debug = false
debug-assertions = false
lto = true
panic = "abort"
incremental = false
codegen-units = 1
rpath = false
strip = false ( see their but actually other than There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed them in current branch, from advice of @msrd0. The compilation step is
|
||||||||||
|
||||||||||
[dependencies] | ||||||||||
ohkami = { version = "0.21", features = ["rt_tokio"] } | ||||||||||
tokio = { version = "1.43", features = ["full"] } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
framework: | ||
github: ohkami-rs/ohkami | ||
version: 0.21 | ||
engines: | ||
- tokio |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use ohkami::prelude::*; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
Ohkami::new(( | ||
"/" | ||
.GET(|| async {Response::OK()}), | ||
"/user" | ||
.POST(|| async {Response::OK()}), | ||
"/user/:id" | ||
.GET(|id: String| async {id}), | ||
)).howl("0.0.0.0:3000").await | ||
} |
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 needed 😛
compilation options are in
rust/Dockerfile
what is codegen-units for ?