Re: [rust-dev] chaining #[start] methods

2014-05-15 Thread Alex Crichton
Rust doesn't support life-before-main, which is basically what this
ends up entailing. What you've done already is likely what you'll want
to keep doing, which is explicitly chaining control flow through the
startup process.

On Thu, May 15, 2014 at 1:11 PM, Noah Watkins  wrote:
> I'd like to put the following in a crate that intercepts start-up to
> modify argc/argv, and then yield to whatever the normal start-up
> procedure is (native, green, call main, etc...).
>
> #[start]
> fn start(...) {
>   /* pre-process argc/argv */
>   call default start-up stuff
> }
>
> Currently I'm having to expose my crate's start-up routine and have
> the program using the crate handle this start-up process. Is there a
> way to have this work transparently within the create?
>
> -Noah
> ___
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
___
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev


[rust-dev] chaining #[start] methods

2014-05-15 Thread Noah Watkins
I'd like to put the following in a crate that intercepts start-up to
modify argc/argv, and then yield to whatever the normal start-up
procedure is (native, green, call main, etc...).

#[start]
fn start(...) {
  /* pre-process argc/argv */
  call default start-up stuff
}

Currently I'm having to expose my crate's start-up routine and have
the program using the crate handle this start-up process. Is there a
way to have this work transparently within the create?

-Noah
___
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev