Advice on Cross-Platform Project


#1

Hi guys,

I’m about to start a Rust project and would like your advice before I embark on it.

What I’m building has the following characteristics:

  • It will be a daemon or background service that will run on potentially hundreds of thousands devices within an enterprise.
  • It will be cross platform supporting the following OS’s:
    • Windows Win7 and later
    • Linux:
      • RHEL 7.1 and later
      • Latest versions of CentOS, Debian, Fedora, OpenSUSE, SLES and Ubuntu
    • Latest version of Android
    • Mac OS 10.11.6 and later
    • Solaris 11.3
  • The program will primarily be doing the following:
    * Reading from and writing to the disk
    * Exposing an HTTPS server and calling HTTPS server on other machines.
    * Communicating using UDP (including broadcasts within a subnet)
    * Communicating using TCP.
  • I mainly intend to make use of the following frameworks:
    * Iron or Rocket for HTTPS server
    * Implies use of Hyper with TLS support
    * Reqwests for HTTPS client-side
    * Tokio for UDP and TCP comms
    * Implies use of mio
    * std::io for disk I/O

What I would like to ask you guys is how viable this project looks for Rust. Specifically:

  • I know Solaris is a Tier 3 platform, but is Rust stable enough on this platform to run in production?
  • Is Tokio supported on Solaris? I have heard mio doesn’t work on that OS.
  • What about Hyper and TLS on any of the non-Tier 1 platforms?
  • From your experience, how stable does Rust tend to be on non-Tier 1 platforms?
  • In general, what problems am I likely to run into with this project?
  • If you think this is an altogether risky undertaking, please feel free to tell me that.

I believe if there are some small gaps, me and my team will be capable of and willing to fill them. But if there’s some major piece missing place let me know. Please feel free to add any other comments you feel will be useful.

If I don’t do this project in Rust, I’ll have to do it in C++. I shudder to imagine that.


#2

I think you shouldn’t use Rust for this if you need to support Solaris, but Android and the rest should be fine.

I know Solaris is a Tier 3 platform, but is Rust stable enough on this platform to run in production?

It should be fine, but Rust doesn’t test on these platforms, so there are no guarantees.

Is Tokio supported on Solaris? I have heard mio doesn’t work on that OS.

Tokio is built on mio, so nope (source). :slight_frown:

What about Hyper and TLS on any of the non-Tier 1 platforms?

Hyper is built on Tokio (source) so again, a no for Solaris. There aren’t many good alternatives, either, except maybe tiny-http, which has a much smaller community around it. Other than that, HTTPS support isn’t bad, but HTTP/2 support is practically nonexistent, if you think you’ll need that. AWWY has more information.

From your experience, how stable does Rust tend to be on non-Tier 1 platforms?

I used it on Android and there weren’t any problems at all, after I got it compiling, but your mileage may vary. Getting it compiling (cross-compilation) was a bit of a pain, but a lot easier than in other languages.

In general, what problems am I likely to run into with this project?

No idea, but good luck! :smile:


#3
  • Mac OS 10.0 came out in 2001. Did you meant 10.10 (2015)? The most recent version is 10.12.5, and mio’s CI only tests that version.
  • Solaris will probably be a pain to use with non-blocking I/O and may require you to add evport support to mio. (This may be interesting to do, but probably also very time consuming.) Blocking I/O should be fine.

#4

Thanks guys. This is good advice.

@killercup Sorry. Should’ve been more precise. I meant Mac OS 10.11.6 and later. I’ll update the post.

I do believe at some point I’ll have to undertake doing a Solaris port of mio. If it proves to be too hard, I’ll probably do a shoddy version (perf wise) and put it in a private fork and use that. I mainly need it to make Tokio and Hyper work for me on Solaris.