Discussion:
[rust-dev] [ANN] Rust Cross Support for PNaCl
Richard Diamond
2014-08-01 00:15:21 UTC
Permalink
Ladies and Gentlemen,

I am pleased to announce WIP-level cross support for le32-unknown-nacl
targets, including x86_64-unknown-nacl (ie translated PNaCl modules). I say
WIP because of a half-dozen number of caveats arising from either bugs in
LLVM (though only w.r.t. PNaCl/NaCl; ie (x86_64|i686)-linux-gnu is
unaffected relative to rust proper), restrictions of Pepper plugins, or
idiosyncrasies of Newlib. Nonetheless, I've reached a MVP state and thus it
is ready to be toyed with by the more courageous among you. PRs are welcome!

Given the needed changes to LLVM and the addition of an extra dep
(nacl-binutils), this fork is unlikely to be upstreamed. I'm not opposed in
any way to upstreaming, however.

The fork is located here <https://github.com/DiamondLovesYou/rust>. If
you're curious as to what doesn't work, checkout the issue board.
Rust bindings to parts of the Pepper API are located here
<https://github.com/DiamondLovesYou/rust-ppapi> (also a WIP).
A simple "Hello, world!" is located here
<https://github.com/DiamondLovesYou/rust-pnacl-hello-world>.

Regards,
Richard Diamond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140731/e22e8a51/attachment.html>
Brian Anderson
2014-08-01 00:23:08 UTC
Permalink
Neat!

I'm particularly interested that you've ported Rust to newlib, which
helps Rust with [this
issue](https://github.com/rust-lang/rust/issues/7283). Do you have a
complete working standard library that builds against newlib and not glibc?
Post by Richard Diamond
Ladies and Gentlemen,
I am pleased to announce WIP-level cross support for le32-unknown-nacl
targets, including x86_64-unknown-nacl (ie translated PNaCl modules).
I say WIP because of a half-dozen number of caveats arising from
either bugs in LLVM (though only w.r.t. PNaCl/NaCl; ie
(x86_64|i686)-linux-gnu is unaffected relative to rust proper),
restrictions of Pepper plugins, or idiosyncrasies of Newlib.
Nonetheless, I've reached a MVP state and thus it is ready to be toyed
with by the more courageous among you. PRs are welcome!
Given the needed changes to LLVM and the addition of an extra dep
(nacl-binutils), this fork is unlikely to be upstreamed. I'm not
opposed in any way to upstreaming, however.
The fork is located here <https://github.com/DiamondLovesYou/rust>. If
you're curious as to what doesn't work, checkout the issue board.
Rust bindings to parts of the Pepper API are located here
<https://github.com/DiamondLovesYou/rust-ppapi> (also a WIP).
A simple "Hello, world!" is located here
<https://github.com/DiamondLovesYou/rust-pnacl-hello-world>.
Regards,
Richard Diamond
_______________________________________________
Rust-dev mailing list
Rust-dev at mozilla.org
https://mail.mozilla.org/listinfo/rust-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140731/115035ca/attachment.html>
Richard Diamond
2014-08-01 00:32:48 UTC
Permalink
Yes, but currently only when target_os = "nacl", ie when one has targeted
le32-unknown-nacl (otherwise it's just a matter of using --cfg
"target_libc=\"newlib\""). I should note however, libuv is for the most
part unable to use Newlib (last time I tried, it was a mess, even after
much effort on my part to remove uses of glibc only functions). In fact, it
is this reason libuv is disabled for PNaCl.

Richard Diamond


On Thu, Jul 31, 2014 at 7:23 PM, Brian Anderson <banderson at mozilla.com>
Neat!
I'm particularly interested that you've ported Rust to newlib, which helps
Rust with [this issue](https://github.com/rust-lang/rust/issues/7283). Do
you have a complete working standard library that builds against newlib and
not glibc?
Ladies and Gentlemen,
I am pleased to announce WIP-level cross support for le32-unknown-nacl
targets, including x86_64-unknown-nacl (ie translated PNaCl modules). I say
WIP because of a half-dozen number of caveats arising from either bugs in
LLVM (though only w.r.t. PNaCl/NaCl; ie (x86_64|i686)-linux-gnu is
unaffected relative to rust proper), restrictions of Pepper plugins, or
idiosyncrasies of Newlib. Nonetheless, I've reached a MVP state and thus it
is ready to be toyed with by the more courageous among you. PRs are welcome!
Given the needed changes to LLVM and the addition of an extra dep
(nacl-binutils), this fork is unlikely to be upstreamed. I'm not opposed in
any way to upstreaming, however.
The fork is located here <https://github.com/DiamondLovesYou/rust>. If
you're curious as to what doesn't work, checkout the issue board.
Rust bindings to parts of the Pepper API are located here
<https://github.com/DiamondLovesYou/rust-ppapi> (also a WIP).
A simple "Hello, world!" is located here
<https://github.com/DiamondLovesYou/rust-pnacl-hello-world>.
Regards,
Richard Diamond
_______________________________________________
Rust-dev mailing listRust-dev at mozilla.orghttps://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
Rust-dev at mozilla.org
https://mail.mozilla.org/listinfo/rust-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140731/466a74f7/attachment.html>
Ilya Dmitrichenko
2014-08-01 05:19:15 UTC
Permalink
Post by Richard Diamond
Yes, but currently only when target_os = "nacl", ie when one has targeted
le32-unknown-nacl (otherwise it's just a matter of using --cfg
"target_libc=\"newlib\""). I should note however, libuv is for the most part
unable to use Newlib (last time I tried, it was a mess, even after much
effort on my part to remove uses of glibc only functions). In fact, it is
this reason libuv is disabled for PNaCl.
It'd would be helpful if you could point out what specific parts of
libuv depend on glibc...

We need to figure out how to move forward with this, whether it's
fixable or rustuv crate would have to be disable when newlib is in in
use.

Loading...