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

Stable Support #49

Closed
ghost opened this issue Jul 28, 2015 · 3 comments
Closed

Stable Support #49

ghost opened this issue Jul 28, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Jul 28, 2015

This is probably a pipe dream. But it would be nice if this could be used on Rust stable. Has anyone investigated the work required? Is it even possible given the limitations of the current version of rust?

Obviously this pretty much used half the feature gates

#![feature(std_misc, libc, asm, core, alloc, test, unboxed_closures, page_size, core_simd, rt)]
#![feature(rustc_private)]
#![feature(unique)]

I'm guessing many of these could be removed if there was some effort. But to get this compiling on rust stable you have to remove all of them. So it would be useful to separate what features are are used out of convince, from what features are used because there is no other (sane) way of working around that missing feature.

The features that won't work on the current version of rust are the asm!() keyword used in src/sys.rs that could probably be removed in favour of a small c library/asm.

I haven't looked deep into this. I wanted to see if this was something that people had considered, and if so were interested in.

@zonyitoo
Copy link
Contributor

Good suggestion.

I have tried to use asm! to embed ASM codes inside .rs files, but failed...

And I am currently working on refactor this crate to have Asymmetric Coroutines and Symmetric Coroutines just like Boost in C++.

At least, rt, core_simd, page_size, alloc have to be reserved.

@canndrew
Copy link

canndrew commented May 4, 2016

What's the status on this? It looks like the current feature list is: fnbox, asm, test, unboxed_closures, std_panic, recover, panic_propagate. How many of these features are now stable or on track for stabilisation? I know std_panic is stable now and I think recover and panic_propogate are due to become stable. Do we actually need the other features? The asm! macro doesn't seem to get used anywhere for example.

@zonyitoo
Copy link
Contributor

zonyitoo commented May 4, 2016

Well,

  • asm was used in context switching, now they are moved to context-rs crate. (can be removed)
  • std_panic, recover and panic_propagate are going to be stablized
  • fnbox is used for std::boxed::FnBox, it is required for coroutine's callback
  • test is only used for benchmarking
  • unboxed_closures... I have forgotten why it is required.

But yes, the other features are required.

Hmm, why not using zonyitoo/coio-rs?

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

2 participants