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

Fix build #25

Merged
merged 2 commits into from
Aug 11, 2019
Merged

Fix build #25

merged 2 commits into from
Aug 11, 2019

Conversation

Avi-D-coder
Copy link
Contributor

On a different note is there anything fundamental preventing a non accelerated version from compiling on stable?

@mtak-
Copy link
Owner

mtak- commented Aug 11, 2019

Sorry for the delay in review. I'm gonna spend some time today getting the new htm intrinsics working and merged, and then review this.

On a different note is there anything fundamental preventing a non accelerated version from compiling on stable?

The main issue preventing swym from being on stable is described here.

The tl;dr is that swym uses a Borrow by memcpy type of approach to avoid allocations and extra indirections (borrow returns a snapshot of the memory). This is not safe for types containing an UnsafeCell. TCell<T>::borrow requires T: Freeze (named Borrow in this library) to prevent that. Freeze cannot be written in stable rust because it requires optin_builtin_traits.

There are alternative ways of implementing borrow, but they either add overhead or require T: Copy.

@mtak-
Copy link
Owner

mtak- commented Aug 11, 2019

Do you know if there's another way to cfg out the test feature - or if it's even necessary? PR looks great!

@mtak- mtak- merged commit 6dc49f1 into mtak-:master Aug 11, 2019
@Avi-D-coder
Copy link
Contributor Author

I don't know a way unfortunately.

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

Successfully merging this pull request may close these issues.

2 participants