pop-os / cosmic-randr

Library and utility for displaying and configuring Wayland outputs
Mozilla Public License 2.0
33 stars 3 forks source link

[Question] Why this crate is so complicated ? #21

Open wiiznokes opened 3 months ago

wiiznokes commented 3 months ago

I don't really see the point of making custom kdl parser and serializer. Why not droping the /shell, and merge all the subcommand of /cli in /lib ? This way, we can have type safe API, and we don't need to launch a new process each time. This would probably fix https://github.com/pop-os/cosmic-settings/issues/318.

I would be happy to work on this if this is wanted

mmstick commented 3 months ago

Is it complicated? It's just spawning a command so that we needn't compile the entire codebase into cosmic-settings. Using the same arguments that command line users use when they use cosmic-randr.

wiiznokes commented 3 months ago

Is it complicated? It's just spawning a command so that we needn't compile the entire codebase into cosmic-settings. Using the same arguments that command line users use when they use cosmic-randr.

Kinda... it will also probably be more efficient to link directly to the lib, not that it matters that much.

Edit: maybe complex is more appropriate than complicated

mmstick commented 3 months ago

Linking to the lib would require compiling and embedding the entire lib and its dependencies. Since we already have a command line interface, the settings application can avoid the need for that by using the command line. Then any updates to the cosmic-randr utility won't require updating cosmic-settings to benefit from it.