Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Saturday September 15 2018, @10:42PM   Printer-friendly
from the rusty-news dept.

Submitted via IRC for TheMightyBuzzard

Programming languages tend to polarize, and Rust is by far no exception. Whether it will stick around and grow as an alternative for the lower levels or not — time will tell. In the meantime, if you're curious about the language and its low-level abilities yourself, [phil-opp] has written a series of blog posts on building your own little bare metal kernel in Rust.

Starting from the basics, [phil-opp] describes in detail the set-up and build process to create a standalone executable that won't be linked against the Rust standard library. From here he proceeds to build a simple operating system kernel that prints a good old Hello World via VGA output — QEMU emulation included. And of course, there is a GitHub repository with all of the source code.

Source: https://hackaday.com/2018/09/08/pun-intended-bare-metal-attracts-rust/


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 1, Interesting) by Anonymous Coward on Saturday September 15 2018, @11:47PM (2 children)

    by Anonymous Coward on Saturday September 15 2018, @11:47PM (#735485)

    "while ( true ) ;"

    I prefer to write "for (;;)" which I read as "forever".

    Starting Score:    0  points
    Moderation   +1  
       Interesting=1, Total=1
    Extra 'Interesting' Modifier   0  

    Total Score:   1  
  • (Score: 1, Informative) by Anonymous Coward on Saturday September 15 2018, @11:57PM

    by Anonymous Coward on Saturday September 15 2018, @11:57PM (#735489)


    #define forever for (;;)
    forever {
    }

  • (Score: 1) by istartedi on Sunday September 16 2018, @08:45AM

    by istartedi (123) on Sunday September 16 2018, @08:45AM (#735582) Journal

    I was taught that

    for (;;)

    is the preferred idiom because the parser recognizes it as a unique situation. The while-loop looks like any other while-loop in the parse tree. Of course any compiler that didn't ultimately optimize them to the same code is an awful compiler.

    --
    Appended to the end of comments you post. Max: 120 chars.