-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Remove support for the deprecated PNaCl technology #42420
Comments
The two terms are a bit confusing. From what I understand is that NaCl is a sandboxing technology while PNaCl is a technology that is both a sandbox around code, and a portable binary format, just like wasm. You are right, the Google blog post I've linked only refers to PNaCl. Now rustc has a target called Now I couldn't find any support in rustc for NaCl itself. I don't know whether a compiler needs special support for NaCl at all, but I suppose there is no need for special support. I'll file a PR to remove PNaCl support and CC you. |
Sounds good. Probably best to cc @eholk as well. Hopefully he will be able to shine some light on the PNaCl vs NaCl situation. |
Remove support for the PNaCl target (le32-unknown-nacl) This removes support for the `le32-unknown-nacl` target which is currently supported by rustc on tier 3. Despite the "nacl" in the name, the target doesn't output native code (x86, ARM, MIPS), instead it outputs binaries in the PNaCl format. There are two reasons for the removal: * Google [has announced](https://blog.chromium.org/2017/05/goodbye-pnacl-hello-webassembly.html) deprecation of the PNaCl format. The suggestion is to migrate to wasm. Happens we already have a wasm backend! * Our PNaCl LLVM backend is provided by the fastcomp patch set that the LLVM fork used by rustc contains in addition to vanilla LLVM (`src/llvm/lib/Target/JSBackend/NaCl`). Upstream LLVM doesn't have PNaCl support. Removing PNaCl support will enable us to move away from fastcomp (#44006) and have a lighter set of patches on top of upstream LLVM inside our LLVM fork. This will help distribution packagers of Rust. Fixes #42420
That's correct that the PNaCl deprecation announcement is specific to PNaCl. As far as PNaCl vs NaCl, NaCl is a sandboxing technology that uses a combination of OS sandboxing techniques and assembly validation. NaCl uses the underlying CPU's native instruction set, meaning you have to provide x64, ARM, etc. if you want to support different platforms. PNaCl is a portable format on top of NaCl. It is based on LLVM bitcode. Before running the executable, the PNaCl translator takes the bitcode and translates it into a NaCl executable that then runs under the NaCl sandbox. I don't know the Rust PNaCl target directly, but I gather that I think NaCl has gotten some use outside the browser, so I could imagine a case for still supporting NaCl in Rust. It's probably only worth doing if there are current users of it though. |
Rust had nacl/PNaCl support since a while (#28355, #29289), but as Google has recently announced the deprecation of their pnacl technology, support for it should be removed from the compiler sooner or later.
The text was updated successfully, but these errors were encountered: