So how do you think they write the kernel if they don't use programming languages? The Linux Kernel is written in C but they have now opened up for new device drivers to be also written in Rust.
So how do you think they write the kernel if they don't use programming languages? The Linux Kernel is written in C but they have now opened up for new device drivers to be also written in Rust.
Why does the kernel need to be "opened up" to accept Rust programs? For the kernel these are just compiled binaries, why does it need to know what language it was written in?
Yes there is nothing stopping you from creating your own home-brew linker and Pascal compilter from achieving this but that is not the question that are being solved, what is being solved is the possibility to create a device driver in Rust and having that same driver being accepted upstream in the Linux kernel proper. This means that #1 the maintainers will accept that code (which they won't do with Pascal since they currently only accept code written in C and soon some new device drivers in Rust) and #2 that the whole build infrastructure around the kernel is changed so that every one can build your new device drivers in Rust with the same standard tools that they use today to build the Kernel.
So in short this is not to make it possible to write a module in something else than C, this is to make it possible to also include that module upstream.
Programming language in OS kernel? (Score:1)
Is this only Rust, or do we already have other programming languages on the inside of the Linux kernel?
Re: (Score:2)
Re: (Score:2)
So how do you think they write the kernel if they don't use programming languages? The Linux Kernel is written in C but they have now opened up for new device drivers to be also written in Rust.
Why does the kernel need to be "opened up" to accept Rust programs? For the kernel these are just compiled binaries, why does it need to know what language it was written in?
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
even if you managed to make Pascal bind to C
Would that not be a task for the linker rather than for the compiler?
And every single attempt to merge Pascal code would be rejected by the kernel maintainers
Of course, but that is a management issue.
(I'm not trying to be obnoxious, these are genuine questions and I appreciate the answer you and others have given.)
Re:Programming language in OS kernel? (Score:2)
Yes there is nothing stopping you from creating your own home-brew linker and Pascal compilter from achieving this but that is not the question that are being solved, what is being solved is the possibility to create a device driver in Rust and having that same driver being accepted upstream in the Linux kernel proper. This means that #1 the maintainers will accept that code (which they won't do with Pascal since they currently only accept code written in C and soon some new device drivers in Rust) and #2 that the whole build infrastructure around the kernel is changed so that every one can build your new device drivers in Rust with the same standard tools that they use today to build the Kernel.
So in short this is not to make it possible to write a module in something else than C, this is to make it possible to also include that module upstream.