Break dependency from fj-window
to fj-host
#1736
Labels
type: feature
New features and improvements to existing features
fj-window
to fj-host
#1736
fj-window
is the Fornjot library that uses winit to provide an event loop and pull much of the Fornjot ecosystem together. It is the main dependency onfj-app
.fj-host
is the library that loads models and is responsible for their interaction.It is totally reasonable to want to build an app with
fj-window
, but at the same time not wanting to be bound tofj-host
, for example to experiment with different approaches to loading models, or with supporting different programming languages for models.Currently, this is not possible, as
fj-window
has a hard dependency onfj-host
. I think it would be better to replace the dependency with a generalized interface, that can be used for alternative implementations. I haven't looked into the details of what would required for that yet, but I think it would boil down to passing the interface forfj-host
intofj-window
'srun
method.I can see two scenarios for implementing this interface:
crossbeam-channel
. I suspect that this might be a bit too simplistic.fj-interop
and implement that trait infj-host
.It would also be possible to achieve the same goal in a different way, by instead creating traits inside
fj-host
to make loading/evaluating/updating models pluggable behaviors.The text was updated successfully, but these errors were encountered: