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

proposal: Make monoio usable on stable rust #95

Closed
Tracked by #479
Xuanwo opened this issue Jul 30, 2022 · 2 comments
Closed
Tracked by #479

proposal: Make monoio usable on stable rust #95

Xuanwo opened this issue Jul 30, 2022 · 2 comments
Labels
F-feature-request feature request

Comments

@Xuanwo
Copy link
Collaborator

Xuanwo commented Jul 30, 2022

Is your feature request related to a problem? Please describe.

opendal intends to empower everyone to painlessly and efficiently access different storage services.

We have stargle a lot with tokio-fs's poor performance for our fs service, so we are evaluating the use of monoio as our fs backend. We only want to use local file IO (read, write, seek, statx and so no). No networking, no socket, no stream, no sink...

However, monoio is nightly only and can't meet opendal build requirements. So I'm thinking can we make monoio usable on stable rust?

monoio is using the following unstable features:

#![feature(generic_associated_types)]
#![feature(type_alias_impl_trait)]
#![feature(box_into_inner)]
#![feature(new_uninit)]
#![feature(io_error_more)]
#![feature(stmt_expr_attributes)]
#![feature(unboxed_closures)]
#![feature(once_cell)]

With hiding net, io under a specified feature, we have no depends on GAT, and monoio can be built on stable rust!

Describe the solution you'd like

Hiding net, io from public API with the specified feature so that monoio is usable on stable rust. And users can enable them with features like nightly if they do want to use monoio on nightly rust.

Describe alternatives you've considered

Add a new feature to hide net and io.

This way can prevent breaking the existing build.

Additional context

Apart from generic_associated_types and type_alias_impl_trait, we should also rewrite some of the code to remove the dependencies on features like box_into_inner. Or hide under feature too.

A possible demo: #96

@ihciah
Copy link
Member

ihciah commented Aug 2, 2022

Local file io is still io, and will use our AsyncReadRent and AsyncWriteRent trait, which are beasd on GAT.
After generic_associated_types and type_alias_impl_trait stablized, maybe we should consider remove other feature dependencies to make it available on stable rust.

(However, you can consider using tokio-uring directly, which can be used on stable rust)

@Xuanwo
Copy link
Collaborator Author

Xuanwo commented Aug 2, 2022

Thanks for explaining.

@Xuanwo Xuanwo closed this as not planned Won't fix, can't repro, duplicate, stale Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-feature-request feature request
Projects
None yet
Development

No branches or pull requests

2 participants