lingua-franca
lingua-franca copied to clipboard
Simplify dealings with `reactor-c` files and scheduler selection
Wouldn't it suffice to select the scheduler in the cmake configuration if we had all reactor-c source file copied?
Originally posted by @lhstrh in https://github.com/lf-lang/lingua-franca/pull/743#r808695441
Why make the scheduler selection a compile time decision? If all the schedulers implement the same API, they can all be compiled and the appropriate scheduler can be chosen by the user (or automatically based on some heuristics)
Why make the scheduler selection a compile time decision? If all the schedulers implement the same API, they can all be compiled and the appropriate scheduler can be chosen by the user (or automatically based on some heuristics)
That sounds fine to me. In that situation, too, we should copy all reactor-c files rather than a handpicked set of files depending which scheduler was selected.
For embedded applications, this could have a serious cost in memory footprint, particularly as we do more research into alternative schedulers.
That's a good point. The reason for this issue, however, is the handling of the source files, which--even if we keep the scheduler a compile-time decision--should be sorted out in the build configuration rather than being replicated in the file copy operation as it is now.