[rust-dev] compiling Rust to C?

2014-07-18 Thread Josh Haberman
Is there any prospect of compiling Rust to C anytime in the mid to near future? This would be a really attractive option for anyone who wants to write in Rust, but wants the extreme portability of C. Actually maybe I should first ask if this is actually a tractable problem. Are there technical

Re: [rust-dev] compiling Rust to C?

2014-07-18 Thread Cameron Zwarich
The biggest problem would be probably be handling stack unwinding (IIRC the LLVM C backend never tried to handle this either). The only option when targeting C is to use setjmp / longjmp, but that is going to be pretty inefficient. Alternatively you could just abort instead of unwinding.

Re: [rust-dev] Requesting information (about globs, macros, subtyping)

2014-07-18 Thread Cameron Zwarich
On Jul 16, 2014, at 10:54 AM, Gábor Lehel glaebho...@gmail.com wrote: 3. As far as I'm aware, subtyping in the current language arises only from subtyping of lifetimes. Where is this important? One example was mentioned in [Niko's recent blog

[rust-dev] Sendable References for data-parallel fork/join-style algorithms

2014-07-18 Thread Sebastian Gesemann
Hi! I was thinking about fork/join-style parallelism and about whether this can be made to work including the possibility to pass references (or something similar to references) across task boundaries. So far, I came up with a little low-level building block that could be of interest to the

Re: [rust-dev] compiling Rust to C?

2014-07-18 Thread Josh Haberman
On Fri, Jul 18, 2014 at 12:35 AM, Cameron Zwarich zwar...@mozilla.com wrote: The biggest problem would be probably be handling stack unwinding (IIRC the LLVM C backend never tried to handle this either). Interesting, I can see what that would be a challenge. The only option when targeting C

Re: [rust-dev] compiling Rust to C?

2014-07-18 Thread Cameron Zwarich
On Jul 18, 2014, at 9:52 AM, Josh Haberman jhaber...@gmail.com wrote: The only option when targeting C is to use setjmp / longjmp, but that is going to be pretty inefficient. Why do you think of setjmp/longjmp as inefficient? If you use the _setjmp/_longjmp variants that don't fiddle with

Re: [rust-dev] compiling Rust to C?

2014-07-18 Thread Eric Christopher
On Fri, Jul 18, 2014 at 12:29 AM, Josh Haberman jhaber...@gmail.com wrote: Is there any prospect of compiling Rust to C anytime in the mid to near future? This would be a really attractive option for anyone who wants to write in Rust, but wants the extreme portability of C. Actually maybe

Re: [rust-dev] Rust universal build issues

2014-07-18 Thread Aljaž Srebrnič
On 17/lug/2014, at 20:08, Brian Anderson bander...@mozilla.com wrote: Thanks for your work on MacPorts. Did you use any flags to configure or arguments to make? What version of OS X, clang/gcc? Yes, sorry, I’m building this on OS X 10.9.4 with system clang (5.1). After further inspection, I

Re: [rust-dev] Rust universal build issues

2014-07-18 Thread Brian Anderson
On 07/18/2014 03:43 PM, Aljaž Srebrnič wrote: On 17/lug/2014, at 20:08, Brian Anderson bander...@mozilla.com wrote: Thanks for your work on MacPorts. Did you use any flags to configure or arguments to make? What version of OS X, clang/gcc? Yes, sorry, I’m building this on OS X 10.9.4 with