Originally posted by oiaohm
View Post
Announcement
Collapse
No announcement yet.
Updated Rust Code For Linux Kernel Patches Posted
Collapse
X
-
- Likes 2
-
Originally posted by oiaohm View PostBut there is still the problem of needing C developers going forwards to maintain core parts and nothing of these changes so far will make that code more readable to developers who are skilled in rust but not C. Time will tell if rust long term for the linux kernel is a benefit or harm.
Really I would have liked to see sparse the static checking program of the Linux kernel over C parts gain more and more ways to checking for faults in the Linux kernel version of C that rust forbids. Yes this would lead to more rust like annotation in the C code so making it simple for rust developer to understand the C code.
- Likes 3
Comment
-
-
Originally posted by uid313 View PostThere are some problems with the Rust language:- Long compile times / slow build
- The resulting binary produced is large
- You cannot declare async functions inside a trait
- Libraries built using a async runtime are incompatible with other libraries built using a different async runtime
- Likes 3
Comment
-
Originally posted by uid313 View PostThere are some problems with the Rust language:- Long compile times / slow build
- The resulting binary produced is large
- You cannot declare async functions inside a trait
- Libraries built using a async runtime are incompatible with other libraries built using a different async runtime
- Slow build is mostly a perception because it builds all dependencies from sources rather than links binaries. If you let your C or C++ project to fully compile all those 3rd-party modules the build times will be an order of magnitude higher (especially for stuff like Boost).
- This is true only for small or trivial projects which are often used to compare binary sizes. Rust links it's standard library statically. C and C++ usually links everything dynamically. For larger apps the difference is not that big. Static linking has a lot of pros (and certainly cons).
- Yes, this is one of the most wanted feature. I think it's being worked on. You can though with `async_trait` but it uses boxing.
- Many runtimes provide compatibility layers
Rgds
- Likes 3
Comment
-
Originally posted by Mario Junior View Post
And almost of things written in rust is "unsafe". The "muuhhh rust is more safe bla bla bla" is just a fucking meme.
- Likes 9
Comment
-
Originally posted by uid313 View PostThere are some problems with the Rust language:- Long compile times / slow build
- The resulting binary produced is large
- You cannot declare async functions inside a trait
- Libraries built using a async runtime are incompatible with other libraries built using a different async runtime
Also, did Rust solve its memory allocation behavior - when it fails to allocate memory to an object it shouldn't panic, the user should handle it graciously.
- Likes 4
Comment
-
Originally posted by uid313 View PostThere are some problems with the Rust language:- Long compile times / slow build
- This is because Rust has to compile every crate/library for some unknown reason. Would be nice to have a cache though...
Originally posted by uid313 View Post- The resulting binary produced is large
Originally posted by uid313 View Post- You cannot declare async functions inside a trait
- Libraries built using a async runtime are incompatible with other libraries built using a different async runtime
Comment
-
Originally posted by uid313 View Post[*]Long compile times / slow build
Originally posted by uid313 View Post[*]The resulting binary produced is large- Crates are linked in statically. This doesn't change anything in the case of the kernel since it obviously doesn't use shared libs in C either;
- The monomorphisation of generic code. My guess is that this won't affect the kernel much since it won't be using this d party generic code anyway
Originally posted by uid313 View Post[*]You cannot declare async functions inside a trait
Originally posted by uid313 View Post[*]Libraries built using a async runtime are incompatible with other libraries built using a different async runtime
Comment
Comment