malino

blog

Applications in malino

This is not implemented yet.


In most Cosmos operating systems, the choices for implementing & running applications are not that good. You practically have the option of either baking all the applications inside your OS or creating and parsing a scripting language.


While Cosmos has some good options for scripting now, like Lua, You still cannot make compiled applications run, and most importantly, almost every OS made with Cosmos has their apps incompatible with each other. So almost nobody makes apps for Cosmos OSes, the most that people are willing to do for Cosmos is to create libraries disguised as apps with an entry point that the OS calls. And even these need to be put inside the OS at compile time, not at runtime.


Since malino uses the Linux kernel, which has very good ELF loading and execution, we have the flexibility to have compiled apps load at runtime. And we can guarantee that if your app runs on one malino OS, it will most likely run on all of them.


While you could get apps at runtime (We'll discuss that later), you could also include files & apps in your OS. This is equivalent to embedded resources in Cosmos, but these will be embedded as files in your OS's file system, not included in the binary of your OS.

# testProject/malino.cfg

# include <file path (starting with https:// will download a file)> <location in the malino system>
# copy /bin/sh to the malino system at the same location
include /bin/sh /bin/sh
# copy jq (commandline JSON processor) from the internet onto /bin/jq in the malino system include https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64 /bin/jq


Loading apps at runtime can simply be done by receiving an app by some means at runtime, and running it with a libmalino function call.


One of the ways you could receive an app is from a universal package API that malino could use. But we're not sure of this yet.