Coder Social home page Coder Social logo

replace c with rust about bus1 HOT 5 CLOSED

bus1 avatar bus1 commented on May 23, 2024 2
replace c with rust

from bus1.

Comments (5)

gregkh avatar gregkh commented on May 23, 2024

Given that the entirety of the rest of the Linux kernel is written in C, kernel modules need to remain as C code, sorry.

Feel free to work on porting Bus1 to a Rust-based operating system kernel, that would be an interesting project.

from bus1.

sonicou avatar sonicou commented on May 23, 2024

There are already kernel modules written in rust https://github.com/tsgates/rust.ko
You can use Rust anywhere you can use C, and it can expose a C ABI, so that anything that can link to C code can link to it.

I don't see any reasen for this not to work.

from bus1.

teg avatar teg commented on May 23, 2024

Sure, it would work, but we'd have no chance of getting this accepted upstream written in anything but C, so there is not really much point in discussing it.

If you want a fun project to try to port bus1 to rust to see how it would look like, I'd be interested in seeing it, but you should know that it would have virtually no chance of getting merged, so would only be an academic exercise.

from bus1.

gregkh avatar gregkh commented on May 23, 2024

I don't see a reason for this not to work

It wouldn't work, Rust doesn't run on all of the zillions of different processors that Linux runs on, and it would not be accepted at all by the upstream community, sorry.

from bus1.

aep avatar aep commented on May 23, 2024

@sonicou
The kernel module gotta be in C. It's already difficult enough to get it upstream D-:
But if you want a rust userspace, i'll happen quickly if bus1 becomes real.

from bus1.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.