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

No-async version #47

Open
dr-orlovsky opened this issue Sep 6, 2023 · 7 comments
Open

No-async version #47

dr-orlovsky opened this issue Sep 6, 2023 · 7 comments

Comments

@dr-orlovsky
Copy link
Contributor

Guys, you started a great effort I have been looking for the last two years - writing pure rust HWI library. Thank you!

One thing though is that I avoid async rust (due to many reasons, mainly listed in ), and thus I am planning to work on a fork of this library which will remove tokio and all async things. I am willing to maintain and support it under auspices of https://github.com/BP-WG/ and use in the https://github.com/mycitadel. Will be glad to see if you - or others - will be also interested in such a thing.

@darosior
Copy link
Member

darosior commented Sep 6, 2023

See #16, it's been a long standing goal to not require async here. If you are going to implement this, a PR making the asyncness conditional on a Cargo feature would be very welcome.

@dr-orlovsky
Copy link
Contributor Author

Yes, I am willing to work on that. Will start with the PR.

@dr-orlovsky
Copy link
Contributor Author

It will be funny to have async-hwi with async being an optional feature :)

@darosior
Copy link
Member

darosior commented Sep 6, 2023

Yeah we could rename it to only hwi in the future!

@benma
Copy link

benma commented Sep 6, 2023

(due to many reasons, mainly listed in ),

I am interested in the reasons if you could provide them.

You can just use a function like block_on() to turn async into sync. Not sure a fork and all the maintenance effort that comes with it would be worth it.

@dr-orlovsky
Copy link
Contributor Author

dr-orlovsky commented Sep 6, 2023

@benma : https://twitter.com/dr_orlovsky/status/1699378415214727531

You can just use a function like block_on() to turn async into sync.

... and still have a runtime, function colouring, IPC with mutexes?! No, thanks :), I prefer to fork and maintain than to support all that load in a program which doesn't touch async.

@benma
Copy link

benma commented Sep 7, 2023

@benma : https://twitter.com/dr_orlovsky/status/1699378415214727531

You can just use a function like block_on() to turn async into sync.

... and still have a runtime, function colouring, IPC with mutexes?! No, thanks :), I prefer to fork and maintain than to support all that load in a program which doesn't touch async.

if you wrap functions with block_on(), you remove the coloring again - just as a suggestion to keep the effort low, but maybe there are simpler ways to have a non-async option that I am missing.

I guess you are aware of it, but since your tweet and comment above mention mutexes, arc, etc.: async and multi threading are independent, and it can (and does) make sense to have async functions without mutexes or multiple threads.

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

No branches or pull requests

3 participants