Let's create a MISRA-like ruleset for Rust
Sealed Rust: A plan to bring Rust to safety critical software domains
Arguments to use Rust over C++ in Embedded Computing Project
You seem to be grossly underestimating maintenance efforts for this project. Let's say you get fired or quit or shifted to another project. They pretty much won't be able to find anyone else to work on this project for maintaining it, and then your boss are going to ask "why the hell can't we find anyone?".
The response is going to be that the previous employee wrote it in a language that is still very new and has a miniscule number of active developers relative to other languages. Then they will ask why the hell did he did that, and you will be left on the hook.
Furthermore, if you are going for rust for its safety features, why? Is this a tool that can kill or seriously injure someone if it goes wrong? If so, you shouldn't be using rust, you should be using a framework that already exists such as iso262626 with its mirsa guidelines. If it kills someone and you get sued, you will have to show the judge that you did your due diligence, and showing that via a framework with precedence is far easier than something as new as rust.
More on reddit.comInherently unsafe C/C++ vs. Rust
Videos
A couple of days ago a repo was posted which showed which MISRA-C rules are already covered by Rust/rustc. Also there is a related clippy issue that discusses MISRA-C rules that could be implemented in clippy.
Personally I don't think that we should try to blindly follow rules that were designed for C. I think it would make much more sense to start compiling a unique set of rules for Rust that makes the language more suitable for safetly related systems.
I don't know if Github issues are the right place to discuss/collect those rules, but I just started a repo containing a few proposals taken from the linked clippy issue.
Opinions?
We are looking at using an Industrial SBC to power a small control system. (ARM based running Linux)
I have been looking at Rust for the past few months and based on my research, it would be ideal for the job. It has all the libraries that we need and is quite safe.
Currently, the development team is just me. While I haven't used Rust yet, I think I will be able to pick it up quite quickly.
We are a small business that mainly programs in PHP. As we are based in a regional town (in Oz), we find it very difficult to find good developers. My manager is concerned that using Rust will make it even more difficult to find additional developers.
My main argument thus far is that C++ would increase the risk that something bad happens compared to the risk of a beginner Rust developer. I would also posit that finding a C++ developer isn't going to be much easier than Rust one based on past success.
Are there any other good arguments or case studies to use Rust over C++? I am interested in other developer's experiences in convincing managers as well.
Note: We are also looking at Python, but I am not sure that is much better than C++.
You seem to be grossly underestimating maintenance efforts for this project. Let's say you get fired or quit or shifted to another project. They pretty much won't be able to find anyone else to work on this project for maintaining it, and then your boss are going to ask "why the hell can't we find anyone?".
The response is going to be that the previous employee wrote it in a language that is still very new and has a miniscule number of active developers relative to other languages. Then they will ask why the hell did he did that, and you will be left on the hook.
Furthermore, if you are going for rust for its safety features, why? Is this a tool that can kill or seriously injure someone if it goes wrong? If so, you shouldn't be using rust, you should be using a framework that already exists such as iso262626 with its mirsa guidelines. If it kills someone and you get sued, you will have to show the judge that you did your due diligence, and showing that via a framework with precedence is far easier than something as new as rust.
We're lacking a lot of context here.
Non-functional requirements:
-
Do you work in an industry where standards are enforced (MISTRA/JSF/...)?
-
What's the impact of a crash? Can the program be restarted?
-
Is performance really an issue? Are we talking hard/soft realtime?
Functional requirements:
-
Is correctness really an issue?
Team requirements:
-
Which languages do you know? And your boss/others likely to have to step in?
-
Which paradigms do you/they know?
-
Are you/they willing to learn?
If performance is not an issue; then there is a whole lot of languages out there which will not crash on you like C or C++ and will probably be easier to recruit for (Java, for example). However, few languages will protect your from an infinite loop...
If correctness is an issue; then C++ is a step up from C and Rust a step up from C++ (as long as you don't need units...) however there are other languages out there: Ada, Haskell, Idris, ...
As for Rust, coming from C++ I find it somewhat easy to grok, as long as I don't delve into unsafe code (where it's back to maintaining the invariants manually and I'm never too clear on what they are...).
Rust definitely has advantages over C++. To cite one: session types. A great tool to model state machines, and what program doesn't contain state machines?
On the other hand, if you want the power of Boost.Units or Eigen, it's going to be an uphill battle in Rust, and the error messages might not be pretty...