I’m excited to announce the May project.
Introduction
May is a high performance stackful coroutine library that can be thought of rust version goroutine. you can use it easily to design and develop massive concurrent programs in rust.
The development of this library was heavily inspired by Python’s generator and Go’s goroutine.
We are not only fearless concurrency in rust but now
embracing concurrency.
About the name
You can think of MAY
as “multi-thread asynchronous yield” abbreviation. But actually it’s my daughter’s nickname. She was born in May when rust v1.0 got released
Goal of May
- High performance with multi-core supported on main stream OS
- Writing asynchronous code with synchronous style just like writing golang program
- Easily porting existing code to coroutine based programs
Main Components and corresponding std library components
may | std | |
---|---|---|
coroutine | may::coroutine |
std::thread |
io | may::net |
std::net |
sync primitives | may::sync |
std::sync |
Of course May
has some features that the std library doesn’t supply. Like cancelling a coroutine, general select API, MPMC channels and so on.
Current status
I have use this library for sometime both in my private projects and company evaluation component. Most of the features are quite stable. Though I didn’t fully test it in every conner cases. The main goals are all fulfilled now. You can explorer more examples on the github page.
Contributing
The project is still in a fresh stage, and there are a lot of things need to polish. I warmly welcome any suggestions for the project, including code review, documentation, usage, examples, tests and performance. you can try it out and create issues in the project.
License
MIT/Apache-2.0
P.S.
My mother tongue isn’t English. I hope you can follow my mind here.
I learned a lot from the rust community in past two years. This is a great community with a lot of edge techs and inspired new ideas. It’s my honor to contribute back to the community.
I hope with more matured features and libraries, we can attract more and more people from other programing languages, like golang and python.
I will use this blog to cover several other topics about May project very soon.
Merry Christmas!