rust-lang / rust-roadmap-2017

Tracking Rust's roadmap
218 stars 12 forks source link

Usage in resource-constrained environments #15

Open aturon opened 7 years ago

aturon commented 7 years ago

Overview

Rust is a natural fit for programming resource-constrained devices, and there are some ongoing efforts to better organize work in this area, as well as a thread on the current significant problems in the domain. Embedded devices likewise came up repeatedly in the internals thread. It's also a potentially huge market. At the moment, though, it's far from clear what it will take to achieve significant production use in the embedded space. It would behoove us to try to get a clearer picture of this space in 2017.

Some potential avenues of exploration include:

UPDATE: A recent survey performed in May revealed that currently the most pressing needs of would-be and current embedded Rust developers are:

Projects

Ericson2314 commented 7 years ago

Not to harp my own RFC, but std-aware Cargo, should remove the need for xargo, right @japaric?

japaric commented 7 years ago

@Ericson2314 Yes. Xargo is the stop gap solution.

Osspial commented 7 years ago

Should GPU shader programming be considered at all when thinking about this? Right now, it's possible to an extent with tools like SPIRV-LLVM but my understanding is that it's not an easy thing to do.

hanna-kruppe commented 7 years ago

@Osspial Writing shaders using the full range of hardware capabilities, even "just" compute shaders, may require substantial language additions. Analogously to how embedded programs need volatile loads and stores for MMIO and placing data in specific sections or at specific addresses, a shader requires a model of the different kinds of memory (local, shared, constant, global) and a way to access to data passed to shaders in unusual ways (e.g., uniforms) — and let's not even go into the technical challenges of integrating the shader with the host program and ensuring the "ABI" (in a loose sense) matches. Depending on what kind of shader environment you target, you may also need to restrict some language features or radically alter the kind of IR rustc outputs.

I'm not quite saying it should be ignored — in fact I myself am currently working on issues closely related to this. But it's a large task with little overlap to classical embedded development, so this tracking issue may not be the best place for it. (cc https://github.com/tomaka/vulkano/issues/353)

japaric commented 7 years ago

Updated the issue to include the most pressing needs of embedded developers as identified in this recent survey, and added some on going community projects.