-
Notifications
You must be signed in to change notification settings - Fork 26
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
make it work with current rust #14
Comments
As of today it is not possible to use a pre-compiled version of rustc. I do not think the team behind rust would be willing to ship a custom rustc and I am not the right person to ask. @fneddy , |
@nbp Since HolyJIT (at the moment) only needs a single patch to work (nbp/rust@9e0d95e), it doesn't seem like it would require too much maintenance effort if it were upstreamed - have to tried to talk to Rust people about that? |
Errors with nbp/rust@9e0d95e [dynasm fails to build]
Errors with patch applied on top of rust-lang/rust@7e70546 [holyjit_plugin fails to build]
|
The way I am working today is using the binary which is in |
@mateon1 The correct way is to build the forked repo (nbp/rust). Your dynasm build failure seems to happen because 5 days ago, @CensoredUsername released dynasm 0.1.3 on crates.io (but it seems that the repo wasn't updated, might want to fix that if you read this), which broke something. Since dynasm is itself a compiler plugin, it frequently needs to be updated to an up-to-date nightly. Fixing its version in the Cargo.toml might be required. |
@mateon1 Try building #17 with the first rustc you've built (nbp/rust@9e0d95e) |
@jonas-schievink Thanks for investigating this issue. I remove my Cargo.lock and was able to reproduce the compilation issues. I just pushed a patch to downgrade dynasm to 0.1.1 and serde_derive to 1.0.12. |
@jonas-schievink I discussed multiple times on the rustc irc channel, and the plugin approach is (was?) a no-go for the compiler team, as it exposes internals of the compiler which would never be stabilized. I do not intent to add any additional patches to rustc at the moment, and I do not think this would be necessary. This patch is a mutated version of a feature which used to be in the compiler, and got remove earlier this year by @nagisa and @nikomatsakis in rust-lang/rust#40239 after I mentioned that I might rely on this interface for making this prototype. One of the reason of the removal of the feature, was to be able to break the API, and avoid stabilizing the MIR. Thus, unless the publication of this project can changed the whole story, I think I will have to find a different way of doing so. I intent to discuss this topic in-person mid-December with @nikomatsakis and also some persons responsible of Rust integration in Firefox such as @bholley and @glandium. |
Ah, that makes sense, I vaguely remember that PR. |
@jonas-schievink whoops, thanks for the reminder. Dynasm 0.1.3 should be pushed now. |
This issue is mostly fixed by bfb32d6 which converts HolyJit to a rustc-driver instead of a compiler plugin, which implies that we no longer depend on a patched version of rustc. As of this commit, HolyJit is now based on a non-patched version of rustc (the nightly version from 2018-02-19), which should make this project more accessible for everybody. The version of rustc on which HolyJit is based can be found in the release.nix file at the top-level. This script is using the rust overlay from nixpkgs-mozilla. I personally use it as follow:
|
needing to recompile a custom version of rustc is very discouraging and inconvenient.
Is it possible to make this work on stable/beta/nightly?
is it possible to install the custom rustc via rustup and switch to it only when working on this?
The text was updated successfully, but these errors were encountered: