Re: Developer-friendliness

Alyssa Ross
2022-12-06T21:14:45Z

[-- Attachment #1: Type: text/plain, Size: 3135 bytes --]

On Tue, Dec 06, 2022 at 09:59:22PM +0100, Michael Raskin wrote:
> >> It may sound like religious point of view, but I strongly believe
> >> that developers is the number one priority to support with Spectrum OS
> >> now — as easier and friendlier the OS will be to the developer as
> >> faster it will be delivered to the common users. It, from my point of
> >> view, includes two main aspects — ease of development giving the
> >> developer proper “bricks” (well encapsulated OS services) and
> >> examples, that coveres main use cases/use patterns of the operating
> >> system.
> >
> >Yes, that's a compelling argument. I wonder if it would make sense to
> >add some special configuration option for development, that would enable
> >extra development tools and other goodies? (I often find myself adding
> >strace…)
> >
> >(I think they probably shouldn't be present by default, because then it
> >could be difficult to be sure nothing was depending on them in future
> >when it came time to remove them. But something that any given
> >developer could set once and then always have developer stuff available,
> >and toggle off when they wanted to test a production build, could make
> >things a lot nicer.)
>
> Well, one could have VM generator functions, so that you can easily
> generate a development-like VM or a reasonable-setup like VM or minimal
> VM (without D-Bus etc.), and so the developers can just use the dev
> version and always get the good stuff included?

Yes, that's true.

Just as a quick refresher, currently if you want to make a Spectrum VM,
these are your options:

- Lay out the VM configuration directory manually in the user data
partition, and bring your own kernel/rootfs.

- As above, but use the rootfs and kernel in /usr/img/appvm. These aim
to provide a "standard" environment that can be shared between
application VMs, so it comes with mesa, and in future virtio-gpu set
up, as well as D-Bus, PipeWire, etc. It mounts a second block device
that contains your application, as well as any dependencies not
included in the base image, and then runs your application from
there. This way, big stuff like mesa only has to exist once on disk.

- Create an application VM that uses /usr/img/appvm with Nix, using
vm-lib/make-vm.nix.

So what we're missing is a way to create, with Nix, a VM that isn't
based on the /usr/img/appvm "template". The reason we don't currently
have such a function is that I don't think it's clear yet how it should
work — what should be customisable, what should be part of the base
image vs. not, etc.? For a while, how make-vm.nix should work was
similarly unclear, which is why it only recently came into existence.
After I'd manually created my third or so application VM, it became
clear what could be part of the base image, and what had to be
customisable. Currently, we only have one VM in the tree that doesn't
use the /usr/img/appvm template, netvm. Once we have more, I think
it'll be easier to evaluate how a more minimal VM builder function
should work.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]