Skip to content
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

Merged
merged 4 commits into from
Jan 26, 2025
Merged

Conversation

kanarus
Copy link
Contributor

@kanarus kanarus commented Jan 25, 2025

No description provided.

@kanarus kanarus requested a review from waghanza as a code owner January 25, 2025 23:40
ohkami = { version = "0.20", features = ["rt_tokio"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
ohkami = { version = "0.21", features = ["rt_tokio"] }
nio = { version = "0.0" }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the idea of this 0.0 ?

Copy link
Contributor Author

@kanarus kanarus Jan 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I forgot to chage features to ["rt_nio"] from ["rt_tokio"].
I'm trying nio experimental runtime instead of tokio here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you then create okhami-nio and okhami-tokio ?

as we have for javascript with -bun and -deno

ohkami = { version = "0.20", features = ["rt_tokio"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
ohkami = { version = "0.21", features = ["rt_tokio"] }
nio = { version = "0.0" }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you then create okhami-nio and okhami-tokio ?

as we have for javascript with -bun and -deno

Copy link
Collaborator

@waghanza waghanza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to expose result for both runtimes, tokio and nio

Copy link
Collaborator

@waghanza waghanza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Comment on lines 7 to 10
[profile.release]
opt-level = 3
debug = false
debug-assertions = false
lto = true
panic = "abort"
incremental = false
lto = true
panic = "abort"
codegen-units = 1
Copy link
Collaborator

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 ?

Comment on lines +7 to +10
[profile.release]
lto = true
panic = "abort"
codegen-units = 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[profile.release]
lto = true
panic = "abort"
codegen-units = 1

Copy link
Contributor Author

@kanarus kanarus Jan 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're quite standard optimizations for release profile ( other rust frameworks do the same in their Cargo.tomls, too )

Copy link
Contributor Author

@kanarus kanarus Jan 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now almost all rust/* are using

[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 Cargo.tomls )

but actually other than lto = true, panic = "abort" and codegen-units = 1 are default configuration of release profile, so I just set them

Copy link
Collaborator

Choose a reason for hiding this comment

The 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

cargo build --release  \
  --config  'profile.release.lto=true' \
  --config  'profile.release.panic="abort"' \
  --config  'profile.release.codegen-units=1'

@waghanza waghanza merged commit 9186c22 into the-benchmarker:master Jan 26, 2025
3 checks passed
@kanarus kanarus deleted the rust/ohkami-v0.21 branch January 26, 2025 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants