It's an interesting idea. But to play devil's advocate, consider the following scenario:
The operating system (OS) is written in Rust but apps or programs can be written in any language. However, the Rust-written OS tightly controls access to every feature of the OS.
Examples:
- If your app needs to access the internet it can only do so through an OS-level API. (This means the OS can record inbound and outbound connections from your app - easily seen by users too.)
- App updates are only possible through an OS API for this purpose i.e. apps cannot initiate an internet connection without using the OS-level update API. (This also makes it easy for users see when apps last checked for updates and the URL the app connects to.)
- Apps require installation using a mandatory OS installation API. No executable can bypass this (even single exe files). The OS records every single file the program installs. Core or critical OS folders are off-limits. Attempts to install files to these folders or locations are forbidden by the OS.
- Related to the above, apps can only be installed in a designated 'Apps' sandbox-like folder. Simply copying an executable to any location on the hard drive is not permitted.
The above probably sounds overbearing if you are a developer. But consider the experience on the other side - as a user. For every application, you can inspect the location of installed app files. (Compare that to the current situation where apps happily spew installation files with abandon anywhere.)
As a user, the OS makes it easy to inspect when an app connects to the internet and lets you choose to block if you suspect any mischief.
So what would be the better scenario? The Rust OS with Rust-only apps? Or a tightly-controlled Rust OS with apps permitted in any language?