--- /dev/null
+-- vim:set ft=lua:
+
+-- Include L4 functionality
+require("L4");
+
+-- Some shortcut for less typing
+local ld = L4.default_loader;
+
+-- Name space for the server program, giving access to the full rom name
+-- space. The server will register the name 'calc_server'.
+local ns_clntsrv_server = ld:create_namespace({
+ rom = L4.Env.names:q("rom");
+ calc_server = "";
+ });
+
+-- The server program, using the 'ns_clntsrv_server' name space. Note that
+-- the name space is read-write so that the server can register its name.
+ld:start({ ns = ns_clntsrv_server:rw(),
+ log = { "server", "blue" } },
+ "rom/ex_clntsrv-server");
+
+-- The client program. The name space is constructed inline and links to the
+-- 'calc_server' entry from the server name space so that it is able to find
+-- it. The 'rom' name space is automatically added.
+-- The client will be started with a green log output.
+ld:start({ ns = { calc_server = ns_clntsrv_server:l("calc_server") },
+ log = { "client", "green" } },
+ "rom/ex_clntsrv-client");