From: Stewart Smith <stewart@linux.ibm.com>
To: "Tanous\, Ed" <ed.tanous@intel.com>
Cc: Emily Shaffer <emilyshaffer@google.com>,
Supreeth Venkatesh <supreeth.venkatesh@arm.com>,
Dong Wei <Dong.Wei@arm.com>, "Naidoo\,
Nilan" <nilan.naidoo@intel.com>,
David Thompson <dthompson@mellanox.com>,
openbmc <openbmc@lists.ozlabs.org>
Subject: Re: Initial MCTP design proposal
Date: Tue, 18 Dec 2018 11:10:08 +1100 [thread overview]
Message-ID: <874lbby9sv.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <AE14EF95-D354-48C6-AB76-95ADF6568951@intel.com>
"Tanous, Ed" <ed.tanous@intel.com> writes:
>> On Dec 10, 2018, at 5:15 PM, Stewart Smith <stewart@linux.ibm.com> wrote:
>>
>> If we were going to bring a not-C language into firmware, I'd prefer we
>> look at something modern like Rust, that's designed to not have
>> programmers marching around with guns pointed at their feet.
>> (I have C++ opinions, most of which can be summarised by NAK :)
>
> Rust seems like an interesting language, but when I last evaluated it for BMC use while looking at the redfish implementation, it suffered from a few killer problems that would prevent its use on a current-generation BMC
>
> 1. The binaries are really big. Just an application with the basics
> (DBus, sockets, io loop) ends up at several megabytes last time I
> attempted it. Most of our c++ equivalents consume less than half
> that. I know rust as a community has worked on the size issue, and is
> making progress, but given the size constraints that we’re under, I
> don’t think 2MB minimum applications are worth the space they take.
> For reference, the project is working to make it possible to build an
> image without python to save ~3MB from the final image.
Interesting. This is different than for host firmware as we'd be
building nostdlib and providing our own base language support environment.
> 2. Rust is relatively new. Finding “seasoned” rust developers,
> especially ones that have that in combination with embedded skills is
> difficult. I don’t believe we have anyone active on the project today
> that has built rust applications at the scale the OpenBMC project is
> at these days. At this point there are a few commercial products that
> use rust, so at least someone has ripped of that band aid, but I don’t
> know if any high reliability, embedded products that have taken the
> plunge yet. If we want to be the first, we should evaluate what
> that’s going to cost for the project.
I'd agree, and that's certainly a concern I share. Firefox is probably
the biggest Rust user out there and one that's been integrating Rust
code into a long living large C++ codebase.
> 3. The supposed safety in rust is only guaranteed if you never call
> into a c library or native code. While there’s pure rust based
> equivalents for a lot of the things we use, most of our code is
> stitching together calls between libraries, and northbound interfaces.
> There might be one or two examples of where we could use rust without
> any c libraries, but I’m going to guess there’s only that . Given
> that, are we better off having a given application written in one
> language or two?
For our host firmware, all packages have at least two languages:
assembler, C or C++. Even small amounts of Rust are going to increase
safety of a bunch of these critical components.
> In short, I’m interested to see how the rust ecosystem progresses, and
> I wait with baited breath for something to emerge that’s better than
> C/C++, but today, I don’t think rust applications in OpenBMC would
> have my support.
I think the arguments for/against Rust usage in OpenBMC are pretty
different to those for host firmware - I'm hoping to spend some time
better getting a PoC up for our firmware stack at some point in the
future though.
--
Stewart Smith
OPAL Architect, IBM.
next prev parent reply other threads:[~2018-12-18 0:10 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-07 2:41 Initial MCTP design proposal Jeremy Kerr
2018-12-07 4:15 ` Naidoo, Nilan
2018-12-07 5:06 ` Jeremy Kerr
2018-12-07 5:40 ` Naidoo, Nilan
2018-12-07 5:13 ` Deepak Kodihalli
2018-12-07 7:41 ` Jeremy Kerr
2018-12-07 17:09 ` Supreeth Venkatesh
2018-12-07 18:53 ` Emily Shaffer
2018-12-07 20:06 ` Supreeth Venkatesh
2018-12-07 21:19 ` Jeremy Kerr
2018-12-11 1:14 ` Stewart Smith
2018-12-11 18:26 ` Tanous, Ed
2018-12-18 0:10 ` Stewart Smith [this message]
2018-12-10 6:14 ` Deepak Kodihalli
2018-12-10 17:40 ` Supreeth Venkatesh
2018-12-11 7:38 ` Deepak Kodihalli
2018-12-12 22:50 ` Supreeth Venkatesh
2018-12-07 16:38 ` Supreeth Venkatesh
2019-02-07 15:51 ` Brad Bishop
2019-02-08 6:48 ` Jeremy Kerr
2019-02-08 15:55 ` Supreeth Venkatesh
2019-02-11 18:57 ` Brad Bishop
2019-02-12 8:43 ` Jeremy Kerr
2019-03-06 20:04 ` Ed Tanous
2019-03-07 8:46 ` Deepak Kodihalli
2019-03-07 19:35 ` Ed Tanous
2019-03-08 4:58 ` Deepak Kodihalli
2019-03-08 5:21 ` Deepak Kodihalli
2019-03-07 20:40 ` Supreeth Venkatesh
2019-03-18 12:12 ` Brad Bishop
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874lbby9sv.fsf@linux.vnet.ibm.com \
--to=stewart@linux.ibm.com \
--cc=Dong.Wei@arm.com \
--cc=dthompson@mellanox.com \
--cc=ed.tanous@intel.com \
--cc=emilyshaffer@google.com \
--cc=nilan.naidoo@intel.com \
--cc=openbmc@lists.ozlabs.org \
--cc=supreeth.venkatesh@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.