Skip to content

Working on exaequOS

Benoit Baudaux edited this page Nov 24, 2024 · 4 revisions

exaequOS

exaequOS (https://exaequos.com) is a Unix-like operating system fully running in a Web browser. It allows you to build and share cross platform applications written in various languages C, C++, Javascript, Lua, Tcl, Scheme, Forth, etc... There are running in WebAssembly in the Web browser.

Developer's guide

You fill find the developer's guide here: https://www.exaequos.com/doc/build/html/dev.html

Raylib for exaequOS

Raylib has been compiled in Web Assembly for the Web browser with OpenGL ES 3.0 (WebGL 2.0), GLFW3 and Wayland thanks to emscripten-exa toolchain. This toolchain is an adaptation of emscripten for supporting exaequOS syscalls.

Text editors

There are 5 text editors embedded in exaequOS for editing source code and storing it in the local persistent file system:

  • Monaco editor: /usr/bin/mc
  • Vim: /usr/bin/vim
  • microEMACS: /usr/bin/em
  • nano: /usr/bin/nano
  • ed: /usr/bin/ed

Note Files can be imported/exported into exaequOS with the exio command line tool.

Source code

You will find source code on GitHub:

Developping Raylib apps

There are currently three ways of developping a Raylib app for exaequOS:

  • In C/C++ with emscripten-exa toolchain
  • In Javascript with QuickJS 2024-02-14
  • In Lua with Lua 5.4.6 interpreter

C/C++

Developer's guide explains how to use emscripten-exa toolchain for building an app in C/C++ from your host machine (using Docker or not).

QuickJS

Raylib bindings for QuickJS have been developped and source code is there: https://github.com/exaequos/raylib-qjs

These bindings include raylib, raymath and raygui. There are loaded with this line on top of the Javascript file:

import * as ray from 'raylib_qjs.so'

Example of Raylib app in Javascript:

import * as ray from 'raylib_qjs.so'

ray.InitWindow(800, 600, "Raylib app");

while (!ray.WindowShouldClose()) {

	ray.BeginDrawing()
	
	ray.ClearBackground(ray.RAYWHITE);
	
	ray.DrawText("Raylib app in Javascript running in exaequOS", 100, 200, 20, ray.BLACK);
	
	ray.EndDrawing()
}

ray.CloseWindow();

Lua

Raylib bindings for Lua have been developped partially: https://github.com/exaequos/raylib-lua

There are loaded with this line on top of the Lua file:

require "raylib_lua"

InitWindow(800, 600, "Raylib app")

while (not WindowShouldClose()) do

	BeginDrawing()
	
	ClearBackground(RAYWHITE)
	
	DrawText("Raylib app in Javascript running in exaequOS", 100, 200, 20, BLACK)
	
	EndDrawing()
end

CloseWindow()

Publishing Raylib app

Once developped, the app can be published on the exaequos store for being accessed by everybody. It can also be accessible from itch.io.

See Developer's guide

Clone this wiki locally