bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Google Summer of Code 2013] - Mozilla Rust language bindings


From: Nolan Tunnicliffe
Subject: [Google Summer of Code 2013] - Mozilla Rust language bindings
Date: Thu, 14 Feb 2013 15:26:46 +1300

The project suggestion below was written for Rust programmers, and would be common knowledge for GNU Hurd developers, due to the subject of GSOC 2013 coming up on the Rust reddit.com forum. If interested in this could you please go to http://www.reddit.com/r/rust/comments/18dfd6/gsoc_2013_started_any_rust_project_ideas/ and click the arrow to show your support for this project.

 

Rust is a language sponsored by Mozilla who are using it to write a next generation web browser engine. It is low level hardware access capable, making it a potential replacement for C and C++ for writing device drivers.

 

From http://www.rust-lang.org/ :

Rust is a curly-brace, block-structured _expression_ language. It visually resembles the C language family, but differs significantly in syntactic and semantic details. Its design is oriented toward concerns of “programming in the large”, that is, of creating and maintaining boundaries – both abstract and operational – that preserve large-system integrity, availability and concurrency.

It supports a mixture of imperative procedural, concurrent actor, object-oriented and pure functional styles. Rust also supports generic programming and metaprogramming, in both static and dynamic styles.

Type system

static, nominal, linear, algebraic, locally inferred

Memory safety

no null or dangling pointers, no buffer overflows

Concurrency

lightweight tasks with message passing, no shared memory

Generics

type parameterization with type classes

Exception handling

unrecoverable unwinding with task isolation

Memory model

optional task-local GC, safe pointer types with region analysis

Compilation model

ahead-of-time, C/C++ compatible

License

dual MIT / Apache 2

 

For the Google Summer of Code 2013, Port the Mozilla Rust http://www.rust-lang.org/ programming language to GNU Hurd, Mach based operating system microkernel. GNU Hurd microkernel allows any language that can RPC Remote Procedure Call http://www.gnu.org/software/hurd/hurd/rpc.html to write kernel ‘servers’ ie. components of the kernel that in Mach’s case run in User mode as opposed to Kernel mode. Allowing an existing modern functioning kernel to be written, extended and potentially parts rewritten in Rust. Kernel writers would use a modern low level capable language, Rust, to extend a functioning kernel and components in a language that was designed to preserve large-system integrity, availability and concurrency, some of the same goals of GNU Hurd project itself.

 

GNU Hurd allows runtime installation of user mode, and most are, kernel components that do not require root access or a reboot to install and if they crash do not bring the whole kernel down. Unlike most UNIX’s, GNU Hurd is designed to be modified and extended through system hooks. The kernel can be developed and progress at a potentially different pace compared to Linux. A lot of functionality is implemented as file system interfaces 'translators' which may be another way of providing further features to Rust without reprioritizing language features such as httpfs virtual filesystem and netio http://www.gnu.org/software/hurd/hurd/translator.html . Perhaps Hurd translators or Rust library features can be written with a layer such that you can add the feature to a GNU Hurd virtual file system 'translator' AND Rust library with a single implementation. Work on either is work on both.

 

Potentially this could mean that one missing aspect of GNU Hurd, drivers, could be written in Rust with the advantage that they are written in a modern language, for making the sacrifice of having to rewrite drivers to work on this kernel as opposed to sticking with existing drivers written in 'C' and Linux. Turning the disadvantage in the lack of drivers currently written for Hurd into an advantage that they could now be written in a new language, Rust. Making the assumption that hardware device drivers can currently be written for GNU Hurd in any language that can RPC and has low level hardware access capability. I believe the project to make userspace drivers exists if not yet fully realized.

 

Even if having the majority of drivers written in Rust is optimistic the above two paragraphs still suggest the advantages of Rust language bindings for GNU Hurd such as being able to write a currently functioning microkernel in the Rust language with all the benefits that implies for both Rust programmers and the GNU Hurd microkernel.

 

78% of the Debian archive builds out of the tree on Debian GNU/Hurd.

 

GNU/Hurd Plans For A Future With USB, SATA, 64-Bit http://www.phoronix.com/scan.php?page=news_item&px=MTI5ODM

http://www.gnu.org/software/hurd/hurd.html

 

 

Modern kernel writing, in a modern language.

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]