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

Scroll 0.9.1 doesn't compile under Rust 1.25.0 due to i128 #40

Closed
sunfishcode opened this issue Sep 23, 2018 · 8 comments
Closed

Scroll 0.9.1 doesn't compile under Rust 1.25.0 due to i128 #40

sunfishcode opened this issue Sep 23, 2018 · 8 comments

Comments

@sunfishcode
Copy link
Contributor

Cranelift currently supports compiling with Rust 1.25.0, and it uses Faerie which uses Scroll. The Scroll 0.9.1 update doesn't compile under Rust 1.25.0, since it uses i128, added in #32, which isn't supported in that version of Rust.

Sample compilation error
error[E0658]: 128-bit type is unstable (see issue #35118)
   --> /home/me/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/scroll-0.9.1/src/ctx.rs:223:38
    |
223 |         impl<'a> FromCtx<Endian> for $typ {
    |                                      ^^^^


I can work around this for now by just fixing the dependency to scroll 0.9.0, and I'll look into other options on Cranelift side, but I'm interested if you have any ideas here too.
@philipc
Copy link
Contributor

philipc commented Sep 23, 2018

build.rs could automatically define a feature for the rust version and use that to enable i128 support, similar to what the rand crate does.

@m4b
Copy link
Owner

m4b commented Sep 23, 2018

goddamnit; should i yank and publish as 0.10?

@m4b
Copy link
Owner

m4b commented Sep 23, 2018

I broke goblin too so that's great also :/

@sunfishcode
Copy link
Contributor Author

Would you be interested in a PR implementing @philipc's idea? That would require adding a build.rs file, but it can follow rand's version which is pretty simple.

@m4b
Copy link
Owner

m4b commented Sep 23, 2018

Maybe; I'd almost prefer to publish a 0.10.0 and let everyone wait until they upgrade/the new edition comes out, and then say it requires 2018; but anyway, i also don't see how that build.rs would fix things? I imagine it's more involved?

@m4b
Copy link
Owner

m4b commented Sep 23, 2018

not sure if yanking and publishing 0.10.0 would work though; also no sure how i ever published a newer version because scroll has a circular dependency on itself, heh.

@m4b
Copy link
Owner

m4b commented Sep 23, 2018

Ok, published 0.9.2; cranelift-faerie is compiling again, thanks to everyone helping out here!

@m4b
Copy link
Owner

m4b commented Sep 30, 2018

Scroll requires 1.20 now; we'll remove the build script once rust 2018 edition is out, and require rust 2018

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