ReturnInfinity / BareMetal-OS-legacy

BareMetal is a 64-bit OS for x86-64 based computers. The OS is written entirely in Assembly while applications can be written in Assembly, C/C++, and Rust.
1.74k stars 302 forks source link

BareMetal Rust #73

Closed techtonik closed 9 years ago

techtonik commented 9 years ago

It seems it be more fun to have support for compiling programs in languages like Rust, that look like more modern/appropriate tools for writing manual memory management programs than C/C++.

IanSeyler commented 9 years ago

Agreed, I can't say that I know a lot about programming in Rust so I would need assistance with this.

A proof of concept already exists for free-standing Rust programs:

https://github.com/charliesome/rustboot https://github.com/pcwalton/zero.rs

I'm unsure of how to call C or Assembly functions from Rust. This would be required for a "Hello World" example.

Roxxik commented 9 years ago

It happens that i have a working Hello World in Rust that compiles under rust 1.3.0 nightly. Currently i don't have the time to upload it but i'll setup up a repo for this tomorrow.

With the inline assembly of rust... i'd currently not recommend to use it, it's poorly documented and likely to change. instead im linking to libBareMetal.