rustmatic
rustmatic copied to clipboard
Assumptions about the environment
What assumptions are we making about the environment?
- Will we have access to an allocator?
- If so, how much memory would you expect to be working with (50KB, 2MB, 16MB, 2GB, etc.)?
- Will we be running on top of an operating system (e.g. realtime Linux), or are we the operating system?
- Do we have access to a TCP stack?
- What other peripherals are available?
Some of my thoughts:
Will we have access to an allocator?
I'm guessing so, seeing as we'll want some level of type erasure (e.g. Box<dyn Process>
) to handle different types of process, possibly not known at compile time (e.g. ladder logic uploaded at runtime).
If so, how much memory would you expect to be working with (50KB, 2MB, 16MB, 2GB, etc.)?
For some reason, I had something like a Raspberry Pi in mind. So a decent amount of memory.
Will we be running on top of an operating system (e.g. realtime Linux), or are we the operating system?
Operating systems give us nice things like TCP, clocks, and threads.
I'm guessing so, seeing as we'll want some level of type erasure (e.g. Box<dyn Process>) to handle different types of process, possibly not known at compile time (e.g. ladder logic uploaded at runtime).
Seems reasonable, there's also some no_std allocators out there, if the need arises.
For some reason, I had something like a Raspberry Pi in mind. So a decent amount of memory. Operating systems give us nice things like TCP, clocks, and threads.
Yeah, down the road, it would be cool to say "you can run this on a micro:bit!" But in short-term I guess we should aim for something running some kind of OS (realtime Linux 👍 ). With that foundation we're free to focus on the PLC problems without getting bogged down in the details.
Who knows, maybe in the meantime wasm/wasi will solve the embedded story for us. Just my 2¢.