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

Support for rustc stable #36

Open
thoughtpolice opened this issue Jan 24, 2023 · 0 comments
Open

Support for rustc stable #36

thoughtpolice opened this issue Jan 24, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@thoughtpolice
Copy link

Currently, Hermit and Reverie both require Rust nightly features. This can be easily seen with the following ripgrep calls (first reverie, second hermit):

austin@GANON:~/src/reverie$ rg -t rust '#!\[feature'

experimental/reverie-sabre/src/lib.rs
9:#![feature(ffi_returns_twice)]

reverie-ptrace/src/lib.rs
32:#![feature(internal_output_capture)]

tests/standalone/parallel_tasks.rs
9:#![feature(get_mut_unchecked)]
10:#![feature(thread_id_value)]
austin@GANON:~/src/hermit$ rg -t rust '#!\[feature'
tests/rust/mem_race.rs
9:#![feature(get_mut_unchecked)]
10:#![feature(thread_id_value)]
11:#![feature(atomic_mut_ptr)]

detcore/src/lib.rs
11:#![feature(async_closure)]
12:#![feature(map_first_last)]
13:#![feature(nonzero_ops)]

detcore/tests/parallelism/mod.rs
9:#![feature(get_mut_unchecked)]
10:#![feature(thread_id_value)]
11:#![feature(atomic_mut_ptr)]

detcore/tests/testutils/src/lib.rs
11:#![feature(trace_macros)]

Rust nightly generally requires extra contortions in order to support in most package managers; infamously, some people even trick the compiler into allowing these features on the stable branch using evil, dark magic. In fact, I have gotten a working build of Hermit inside Nixpkgs (NixOS/nixpkgs#212278), but I am uneasy about using such evil magic and people will probably get upset about it.

Therefore I am filing this bug as a general "meta issue" to keep track of the question: would it be possible to use Hermit with a stable Rust compiler? And if it can be done, what's needed to do so, and what's blocking it from happening? If there's no chance of supporting stable Rust, that should also be clarified, but in my experience a lot of Nightly features come down to "this is significantly easier than the workaround."

Some of these definitely look like conveniences e.g. map_first_last or atomic_mut_ptr (I believe these can be worked around with some copy/pasting or unsafe magic), while others come across as more fundamental such as ffi_returns_twice; but maybe it's nothing some good old fashioned assembly programming can't handle.

Please note this isn't a critical requirement or anything or something time sensitive; it's not like I'm literally stuck without this. But I figured it would be nice to get the conversation rolling.

@thoughtpolice thoughtpolice added the bug Something isn't working label Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant