graalvm / sulong

Obsolete repository. Moved to oracle/graal.
Other
628 stars 63 forks source link

Add support for Rust version 1.26.0 #843

Closed anatol1234 closed 6 years ago

anatol1234 commented 6 years ago

The signature of the std::rt::lang_start function has changed since version 1.19.0 to support returning a Result from the main function. This feature has been stabilized in version 1.26.0. This pull request includes support for the new signature. It enables Sulong to run code like:

fn main() -> Result<(), &'static str> {
    Err("something went wrong")
}

Output: Error: "something went wrong"

christianhaeubl commented 6 years ago

Thanks for the contribution, I added one comment regarding LLVMLangStartInternal.