Repository navigation
Releases
OpenECS 0.8.0
OpenECS 0.8.0 runs Lua plugins on LuaJIT, whose compiler makes their code run at nearly C's speed, and lets Lua call C through LuaJIT's FFI. The core now draws every menu and tooltip of a tool, so they look and work the same everywhere. A tool gets menus and buttons in its title bar, eleven themes, and a denser look with JetBrains Mono. Panels get badges and redraw on events, plugins hear the log, sessions follow their preset, and tests can drive menus, settings and file dialogs. OpenECS is now under the 0BSD license.
It comes out with the releases of the two repositories that OpenECS ships, each described in its own release:
- OpenECS-std 0.8.0: the new plugin history, with undo and redo for any tool; ui's boards, icons, labels, callbacks by meaning, drawing on the GPU and long lists and trees built in view; fs's full set of file operations, the trash and watching inside folders; the files panel's tree and grid; and the console's sources, filter, sorting and counts.
- OpenECS-examples 0.8.0:
c15_board, a board of blocks and wires, ands26_history, undo and redo; every example on LuaJIT 2.1, its Lua panels objects of a class, showing the release's features.
This is still an early release.
What you can do
Run Lua plugins on LuaJIT. Lua plugins run on LuaJIT 2.1 in place of Lua 5.5. They have Lua 5.1's language and libraries, the extensions from Lua 5.2 and 5.3, the syntax that LuaJIT 2.1 takes from LuaJIT 3.0, such as +=, continue and ?., LuaJIT's bit, ffi, jit, string.buffer, table.new and table.clear, and utf8 from lua-compat-5.3 0.15.1. DESIGN 9.6 lists them all.
Call C at C's speed. Lua calls plugins' C functions, and the core's surface and panel methods, through LuaJIT's FFI, so the compiler compiles the call with its caller. Handles and structs are cdata, with their methods and operators. A buffer argument takes a string, a string.buffer, or a cdata array or struct, without a copy. Workers' values go between threads as string.buffer's bytes, and 64-bit integers cross. While ecs.profile is on, ecs.profile.get also gives the Lua functions that took the most time, from LuaJIT's sampling profiler.
Open menus and show tooltips through the core. ECSPanel_OpenMenu, in Lua panel:openMenu, opens a menu of entries that run a function by name or a click, with tooltips, dimmed and checked entries, lines, headings and submenus. ECSPanel_ShowTooltip and ECSPopup_ShowTooltip, in Lua panel:showTooltip and popup:showTooltip, show the tool's one tooltip. Menus show what cannot be done now dimmed, with why in its tooltip, and long menus scroll. ECSPopup_StartDrag, in Lua popup:startDrag, drags data from a popup onto a panel. ECSPopup_OpenFrom, in Lua popup:openPopup, opens a popup beside another, for submenus.
Give a tool its title bar. The setting ecs.titleMenus gives the title bar's menus: File and Window by default, then Tools, where ECSApp_AddMenuEntry and ecs.app.addMenuEntry add a plugin's functions. The setting ecs.titleButtons adds the tool's own buttons, at the left or the right, and a button can look like a search field. ECSPanel_FindTitleButton, in Lua panel:findTitleButton, gives a button's place, so a popup opens below it. With two or more workspaces, a menu at the right switches between them. The window buttons are part of the title bar, and its parts show tooltips.
Choose a theme. The interface follows classic editors: neutral greys, the focused panel framed in the accent, rounded corners, a font of 13 and lower tab rows. The core's font is JetBrains Mono, and Roboto still ships for ecs.font. The shown tab of every group is filled with the theme's selected colour. Seven colours join the theme: ecs.colorPanel, ecs.colorField, ecs.colorButton, ecs.colorButtonHover, ecs.colorHover, ecs.colorError and ecs.colorWarning. Besides dark and light, the core ships deepDark, highContrastDark, highContrastLight, midnight, ember, forest, paper, sakura and peony, and ecs.theme offers every theme of the settings files, including the user's own.
Make panels tell more. ECSPanel_SetBadge, in Lua panel:setBadge, shows a short text after a panel's title, such as a count of new messages. A panel type's redrawOn names events that draw its panels again, so a plugin keeps no list of panels to redraw. Panels hear PointerLeave, and DragOver and DragLeave while data is dragged over them, so a panel shows where the data will land. Pointer events carry the system's count of clicks. ECSLayout_FindByType, in Lua ecs.layout.findByType, finds an open panel of a type. ECSPanel_GetPlace, in Lua panel.place, gives a panel's place in its OS window.
Arrange panels more easily. A press where two splits meet drags both dividers at once. Dividers under the pointer show a line of the accent, and a press beside a divider's gap grabs it. A dragged divider lines up with other dividers, with equal shares of its split, and with the middle of its neighbours. A right click on a tab, on the rest of a tab row or on a grip opens the panel's one menu. The wheel over a tab row shows the next or previous tab. ecs.layout.moveToNewWorkspace, the prefix then Shift+N, moves the focused panel to a new workspace.
Bind keys for a whole plugin. ECSKey_Bind and ecs.key.bind take a scope: a panel type, the plugin's own name for all of its panel types, or prefix for a key after the prefix to one of its functions. The core emits ecs.prefix while it waits for the key after the prefix, and the standard plugin keys lists them. Every tool loads history, with Ctrl+Z for undo, and Ctrl+Y and Ctrl+Shift+Z for redo.
Hear the log. The core emits each line of the log as the event ecs.logged, from any thread, with its time, level, plugin and message, so a console shows the log to the tool's user.
Set a setting for one run. ECSSetting_SetForRun, in Lua ecs.setting.setForRun, sets a value that no file keeps, such as a frame colour while a game plays. Nil takes it away.
Keep sessions up to date. A session names its preset. When it opens, the preset gives the tool's menus, keys and settings again, and the session keeps the user's workspaces, panels and state.
Test more of a tool. test.menu and test.choose read and choose the entries of the open menu, test.tooltip reads the tooltip, and test.titleBar reads the title bar. test.setSetting changes a setting, test.call calls a function with values, and test.fileDialog answers a file dialog. test.errors and test.misuses give what plugins reported. Every build runs tests, and shuild's -j runs the tests of several examples at once. A test has XDG folders of its own, so it writes nothing of the user's.
More for plugins. ECSValue_Copy copies a value. ecs.path.full gives a path's full form. A handle parameter written handle<name>? takes nil. A popup sets the entries it shows with ECSPopup_SetItems, and takes typed text with ECSPopup_SetTextInput.
Build into another folder. shuild.c's -o, --output, names the folder the build goes into, in place of build/. Its flags print their help from one list.
Small fixes
- A native plugin whose library does not exist says so, with its path.
- A Lua plugin's choice setting starts at its default, not at its first choice.
--installwrites a desktop entry that launchers accept.- Double clicks come from the system's count of clicks.
- Stopping a timer that already ended does nothing.
- Functions that other threads send to the main thread never run inside a message dialog.
- A handle in dragged data, or in a drop that waits, gives no object once its object is freed.
- A tab behind another shows its new title and unsaved mark at once.
- A setting's value of the wrong type is reported once, and a saved session leaves it out.
- Setting a key works when the settings file cannot be written.
- A misuse inside a Lua function that C called names the function.
- A tooltip popup takes no pointer events, so a click beside it reaches its panel. A popup stays inside its OS window, and a popup window is never stretched.
- A menu is as wide as its widest entry, and the workspaces' menu opens with the current workspace chosen.
- On Linux, quitting no longer aborts where a tray host runs.
- Key presses, theme colours and the interface's texts are kept parsed or laid out, so frames draw faster.
What will break
Native plugins. OPENECS_API_VERSION is 4, so a plugin's manifest says api = 4. ECSPanelTypeDesc loses minWidth and minHeight and gains redrawOn and redrawOnCount, and ECSPopupDesc loses anchorWidth. A panel's or popup's draw that opens, moves or closes a panel is a misuse. A C function that Lua calls through the FFI, and that calls Lua, is a misuse.
Lua plugins. LuaJIT has no integers: numbers are doubles, whole up to 2^53, and //, math.type and string.pack are missing. Use math.floor, % 1 and FFI arrays instead. Handles and structs are cdata: a handle's fields are read-only, and == on structs compares identity. A worker's message, input or result that holds a function, a handle or a struct is an error, not skipped. A number outside an int's range given to a surface's method is an error, not clamped.
Manifests. A plugin's name may not hold a dot, or be prefix.
Settings. ecs.toolMenu is gone: the title bar's menus are ecs.titleMenus, and a plugin adds its functions to Tools with ecs.app.addMenuEntry. ecs.tabScrollStep is gone. The core's settings file no longer binds the standard plugins' keys after the prefix: each plugin binds its own.
Sessions. Presets ...
OpenECS 0.7.0
OpenECS 0.7.0 reloads plugins while a tool runs, so a plugin's author sees a change without a restart. It adds a profiler that shows where the time goes, by plugin and by panel, and a list of every key binding to change. Failures and wrong arguments are told apart, and panels draw only what changed. Seven new standard plugins show a project's files, look at a file, keep a console, match regular expressions, show Markdown, colour code and play video, and ui gains search, menus, sections, graphs and drag and drop.
It comes out with the releases of the two repositories that OpenECS ships, each described in its own release:
- OpenECS-std 0.7.0: files, viewer, console, regex, markdown, syntax, video, profiler and keys, and ui's new elements and styles.
- OpenECS-examples 0.7.0:
s18_regextos25_keys, and reloading inc8_stateandc2_native.
This is still an early release.
What you can do
Reload plugins. With the setting ecs.reloadPlugins on, OpenECS checks the plugins' files every ecs.reloadInterval seconds, and reloads a plugin once its files stop changing. The prefix then Ctrl+R, or the panel's menu, reloads the focused panel's plugin. A reload disables the plugin and the plugins that depend on it, without asking, and enables them again from their files; their panels keep their state. A native plugin loads from a copy of its library, so its build can replace the library, on Windows too. Plugins do the same with ECSPlugins_Reload and ecs.plugins.reload.
See where the time goes. The prefix then F opens the profiler. While the setting ecs.profile is on, OpenECS measures each pass of the main loop by step, each plugin's own time and each panel's draw. A plugin's time leaves out the plugins it calls, so a Lua panel's calls into draw count as draw's. Plugins read the measures with ECSProfile_Get and ecs.profile.get.
Change every key in one place. The prefix then K opens the key list, which is also in the tool's menu. It shows every binding by scope, and changes, removes or adds a key in the user's settings. Plugins do the same with ECSKey_List, ECSKey_Set and ECSKey_ListFunctions, and ecs.key in Lua.
Tell failures from mistakes. A service's failure, such as a file that cannot be read, is returned to the caller with why: ECS_Fail in C, ecs.fail in Lua, and in Lua nil and the message. A wrong argument is a misuse: ECS_Check and ecs.check report it, and Lua code stops at the line that made the call. The setting ecs.logServiceErrors logs the failures; a tool that expects them turns it off. Duplicate names, bad signatures and keys that are not key combinations are misuses too.
Draw only what changed. A surface keeps its pixels between draws, and kept (surface.kept in Lua) says so. ECSSurface_Changed (surface:changed) names the rectangle that a Draw changed, and only that goes to the texture. A frame draws and presents only the OS windows that changed.
Scale the interface. The setting ecs.scale scales every panel, popup and the core's own interface, live.
See groups apart. The new colour ecs.colorFrame draws a frame around each group of panels.
Small fixes
- Calls from Lua into C keep their storage on the C stack, and reuse their callbacks, so they allocate less.
- An emitted event goes only to the subscriptions made before it, in the order they were made.
- Frames are drawn while the system moves or resizes a window.
- A plugin that fails as it is enabled stays disabled. A plugin that an enabled plugin depends on cannot be disabled.
- Background work stops before plugins are destroyed, and is refused from a plugin that is being disabled.
- A settings file that could not be read is never written over. A session that cannot be read is moved aside, and the tool starts from the preset.
- A panel whose id in a file is taken gets a new one.
- Every setting change redraws every panel and popup.
ecs.fontis a path, of the new setting typepath.
What will break
Native plugins. OPENECS_API_VERSION is 3, so a plugin's manifest says api = 3. ECS_RunInBackground's done takes (void *data, bool dropped) and always runs, so it frees the data. The public functions check their arguments in every build, so a wrong argument that a Release build let pass is now reported.
Lua plugins. A failed call gives nil, then why, last, whatever its results. A registration with a duplicate name or a bad signature raises an error, so it needs no assert. A service's name may not repeat its plugin's name. ecs.handle.new and ecs.handle.value take a handle type's local name.
Standard plugins. OpenECS-std's release says how ui's props, its styles and textgrid's scale changed.
Presets, sessions and settings files keep their formats.
Downloads
openecs-0.7.0-linux-x86_64.tar.gz: the program with SDL's libraries, its plugins, presets and examples, the plugin interface, and the licenses. Unpack it and runOpenECS. It needs glibc 2.38 or later, such as Ubuntu 24.04 or Fedora 39.openecs-0.7.0-windows-x86_64.zip: the same for Windows on x86_64, with SDL's DLLs besideOpenECS.exe.openecs-0.7.0-source.tar.gz: the source with every library it uses. GitHub's own "Source code" archives leave the libraries out, so use this one to build.SHA256SUMS: checksums of the archives.
OpenECS is under the zlib license.
OpenECS 0.6.0
OpenECS 0.6.0 lets you enable and disable plugins while a tool runs, and gives plugins structs: plain data with methods and operators, which C and Lua share. A tool can be added to the system's launcher on Linux and Windows. Seven new standard plugins read data formats, compress, run programs, read gamepads, hash, keep SQLite databases and show notifications.
It comes out with the releases of the two repositories that OpenECS ships, each described in its own release:
- OpenECS-std 0.6.0: parse, compress, process, gamepad, hash, sqlite and notify, the plugin list, web's HTTP/2, and cglm on structs.
- OpenECS-examples 0.6.0:
c14_structsands11_parsetos17_notify.
This is still an early release.
What you can do
Enable and disable plugins while the tool runs. The plugin list, the prefix then ;, lists every plugin in the plugin folders. Disabling a plugin asks about its panels' unsaved work, disables the plugins that depend on it, and keeps its panels as placeholders with their state. Enabling it loads it again and gives back its panels. The session remembers what you changed. Plugins do the same with ECSPlugins_Enable, ECSPlugins_Disable and ECSPlugins_List, ecs.plugins in Lua, and follow it with the event ecs.pluginsChanged.
Share plain data as structs. ECSStruct_Register(plugin, "vec3", "float x, float y, float z") registers a struct type, which signatures name struct<plugin.vec3>. C passes it by pointer; Lua gets a table of its fields. ECSStruct_AddMethod makes a function a method, and a method named add, mul, eq and the like is also Lua's operator, so a + b works. ecs.struct.register, addMethod and new do the same in Lua, and the definition files declare each struct for editors.
Group functions in namespaces. A function named with dots, such as json.read, is a nested table in Lua, parse.json.read, and a class in the definition files.
Add a tool to the launcher. OpenECS --install --preset FILE adds the preset's tool to the system's launcher, with its name and icon, and --uninstall removes it. On Linux it writes a .desktop file. On Windows it makes a Start menu shortcut, whose windows the taskbar groups, and adds the tool to "Open with" for its files. A preset's app.categories and app.mimeTypes say where the tool goes and which files it opens.
Open the tool's menu. A right click on the title bar, or the prefix then A, opens a menu of the functions that the setting ecs.toolMenu names, the workspaces, resetting the layout, and quitting.
Go through a table's fields. ECSValue_GetTableFieldCount and ECSValue_GetTableFieldAt go through a table's named fields, in the order they were set.
Small fixes
- Panels and popups sit on whole pixels, and their pixels show one to one, so text stays sharp at any place and size.
- Lua panels draw faster: a surface's methods are found before its fields, and
fillandsetPixelparse a colour text once while it stays the same. - Functions that a plugin's threads sent to the main thread run before its library is unloaded.
- Events no longer leak what an undelivered event carries, such as a dropped file or typed text.
What will break
Sessions. They are format 3, which lists the plugins that you enabled or disabled. OpenECS 0.6.0 reads formats 1 to 3; an older OpenECS cannot read format 3.
Presets. Presets are format 2 when they set app.categories or app.mimeTypes. OpenECS reads formats 1 and 2.
Native plugins. OPENECS_API_VERSION stays 2, and the interface only gained functions, so native plugins of 0.5.0 still load. A plugin that uses the new functions needs OpenECS 0.6.0.
cglm. Its vectors and matrices are structs; OpenECS-std's release says how to change your code.
Build scripts with shuild. SHU_MODULE is SHU_Module, and SHU_UtilBuildScript is SHU_Shuild. shuild writes compile_commands.json only when the build script defines SHUC_COMPILE_DATABASE.
Downloads
openecs-0.6.0-linux-x86_64.tar.gz: the program with SDL's libraries, its plugins, presets and examples, the plugin interface, and the licenses. Unpack it and runOpenECS. It needs glibc 2.38 or later, such as Ubuntu 24.04 or Fedora 39.openecs-0.6.0-windows-x86_64.zip: the same for Windows on x86_64, with SDL's DLLs besideOpenECS.exe.openecs-0.6.0-source.tar.gz: the source with every library it uses. GitHub's own "Source code" archives leave the libraries out, so use this one to build.SHA256SUMS: checksums of the archives.
OpenECS is under the zlib license.
OpenECS 0.5.0
OpenECS 0.5.0 makes the plugin interface plainer: each job has one function, and C and Lua call it by the same name. A plugin author gets only the interface, with no library headers in it, and OpenECS --definitions writes all of it. Shaders are written in GLSL, and a new plugin brings cglm's math to Lua.
It comes out with the releases of the two repositories that OpenECS ships, each described in its own release:
- OpenECS-std 0.5.0: the cglm plugin, gpu's shaders from GLSL, scoped clips, native folder watching on Windows, and the standard plugins built for each system.
- OpenECS-examples 0.5.0: the examples, renamed
c…for the plugin interface ands…for the standard plugins, ands10_cglm.
This is still an early release.
What you can do
Write a plugin from the interface alone. A release's include/ holds OpenECS.h, shu.h, ecs.lua, and each plugin's NAME.h and NAME.lua: nothing else. OpenECS --definitions FOLDER writes the same folder, which always matches the program that wrote it. A plugin that needs a library brings it itself.
Call one function for each job, by one name. Output parameters come first after the object, such as ECSPopup_Open(panel, &popup, &desc), and end functions clear the handle. C and Lua names match: ECSKey_Bind and ecs.key.bind, ecs.setting.*, ecs.panel.listTypes, ecs.dialog.showMessage, subscription:unsubscribe() and the others that DESIGN.md lists.
ECSPath_GetFullgives a full path, andECSPath_Freefrees it.ECSHandle_Freefrees a handle that a function gave.
Follow settings. ecs.settingChanged is sent when a setting's value in effect changes, with the setting's full name, so a plugin can follow a setting it does not own, such as ecs.font.
Move panels between workspaces from the keyboard. Shift+1 to Shift+0, after the prefix, move the focused panel to workspace 1 to 10.
Read the log on a terminal. Its levels are coloured there.
Build and test with one command. ./shuild.ignore -t builds in Debug with the examples and runs their tests; -t c12_sketch runs one example's.
Small fixes
- Where windows overlap, a dropped panel goes into the front one.
- On Wayland, a panel dragged between windows shows where it will drop.
- A plugin whose save failed no longer loses the state that the session already had.
- Tasks still waiting at shutdown are freed.
- When the focused panel moves to another workspace, the focus goes to the panel that its old group now shows.
What will break
Native plugins. OPENECS_API_VERSION is 2. Build native plugins again against this release's include/, and set api = 2 in their manifests.
- Renamed functions and fields: those above,
ECSValue_AddListItem,ECSValue_SetTableField,ECSPanel_GetUnsaved,ECSPopupKindisECSPopupTypewith the fieldtype, the wheel event's fields arescrollXandscrollY, andECSPath_LastSeparatorisECSPath_FindLastSeparator. - Reordered parameters: the output comes first, as above.
- Removed:
ECSPanel_StartTimerandpanel:startTimer; start timers withECSTimer_Startandecs.timer.start, and stop them in Destroy. ECSSession_Openopens sessions only;ECSSession_OpenPresetopens presets.ECSLayout_Close,ECSSession_SaveandECSSession_Openneed their argument.OpenECS.hincludesshu.h, which is beside it.
C plugins on Windows. lib/ holds only libOpenECS.a. A plugin that used SDL's import libraries brings SDL itself.
Your folders. They are named OpenECS: ~/.config/OpenECS/, ~/.local/share/OpenECS/ and ~/.local/state/OpenECS/ on Linux, and %APPDATA%\OpenECS\ on Windows. Settings and sessions in the old lowercase folders are not moved; move them by hand. The log is OpenECS.log.
The command line. -l, --log-input is removed.
Downloads
openecs-0.5.0-linux-x86_64.tar.gz: the program with SDL's libraries, its plugins, presets and examples, the plugin interface, and the licenses. Unpack it and runOpenECS. It needs glibc 2.38 or later, such as Ubuntu 24.04 or Fedora 39.openecs-0.5.0-windows-x86_64.zip: the same for Windows on x86_64, with SDL's DLLs besideOpenECS.exe.openecs-0.5.0-source.tar.gz: the source with every library it uses. GitHub's own "Source code" archives leave the libraries out, so use this one to build.SHA256SUMS: checksums of the archives.
OpenECS is under the zlib license.
OpenECS 0.4.0
OpenECS 0.4.0 runs on Windows, with a release you unpack and open. GPU panels work on laptops whose integrated GPU drives the screen, and OpenECS works better on Wayland, also with tiling compositors such as Hyprland and sway.
It comes out with the releases of the two repositories that OpenECS ships, each described in its own release:
- OpenECS-std 0.4.0: the standard plugins on Windows, and
gpu.glyphs, which gives a text's glyphs to your own shaders. - OpenECS-examples 0.4.0: the examples on Windows and Wayland, and a label in
22_gpu_model's 3D scene.
This is still an early release.
What you can do
Use OpenECS on Windows. Unpack openecs-0.4.0-windows-x86_64.zip and open OpenECS.exe. It needs Windows 10 or later.
- Settings, sessions, presets and the log are in
%APPDATA%\openecs\. - Started from a console, it writes its log to that console as well.
- Build it from source with LLVM-MinGW or MinGW's gcc, on Windows or as a cross compiler from Linux, as README.md says.
Write C plugins for Windows. The zip's lib/ holds the import libraries of OpenECS, SDL3 and SDL3_ttf, which a C plugin links on Windows. ECSPath_IsSeparator, ECSPath_IsAbsolute and ECSPath_LastSeparator handle paths with Windows' drives and backslashes.
Show GPU panels where the GPU cannot present to a window. On a laptop whose integrated GPU drives the screen, the window shows copies of the GPU panels, which the GPU sends back after each draw. Before, it showed placeholders.
Use OpenECS on Wayland.
- Dragging a panel out of a pop-out window into another window works.
- Closing a window from the compositor, such as with Hyprland's close key, asks about unsaved work and waits for the answer.
Test on Wayland. .github/scripts/test-wayland.sh runs the tests on Wayland, in a headless sway that tiles the windows. There, popups and pop-out windows are windows of their own. The checks run it on every change.
test.popup(number)gives an open popup's rectangle and its window.- A pointer event over a popup window goes to that popup, as the system gives it.
- A test goes on once each window has the size that the compositor gave it.
Small fixes
- A placeholder, or a panel that failed, no longer keeps a processor core busy.
- In Debug builds, a leak inside a graphics driver no longer fails the program;
--definitionsexited with an error on some laptops with two GPUs. - The build's lines are coloured, in shuild's style.
What will break
Nothing that plugins, presets, settings or sessions use changes.
Tests. test-wayland.sh needs sway: sudo apt-get install sway on Debian and Ubuntu.
Downloads
openecs-0.4.0-linux-x86_64.tar.gz: the program with SDL's libraries, its plugins, presets and examples, the plugin interface, and the licenses. Unpack it and runOpenECS. It needs glibc 2.38 or later, such as Ubuntu 24.04 or Fedora 39.openecs-0.4.0-windows-x86_64.zip: the same for Windows on x86_64, with SDL's DLLs besideOpenECS.exe.openecs-0.4.0-source.tar.gz: the source with every library it uses. GitHub's own "Source code" archives leave the libraries out, so use this one to build.SHA256SUMS: checksums of the archives.
OpenECS is under the zlib license.
OpenECS 0.3.0
OpenECS 0.3.0 lets panels draw on the GPU, and Lua plugins run work on threads of their own. Plugins pass more to each other: functions they keep, buffers and handles in values, and methods on handles. Message dialogs are drawn by OpenECS itself, every tool can go to another, and presets can tell a new user what to try first.
It comes out with the releases of the two repositories that OpenECS ships, each described in its own release:
- OpenECS-std 0.3.0: two new standard plugins, web for HTTP, HTTPS and WebSockets, and gpu, which draws on the GPU; and much more in ui, mixer, gltf, image, textgrid, net and fs.
- OpenECS-examples 0.3.0: four new examples, on web, workers and the GPU, and the new functions in the examples of 0.2.0.
This is still an early release. Plugins made for 0.2.0 need the changes under "What will break".
What you can do
Draw on the GPU.
- A panel type with
surface = "gpu"in Lua, orECSSurfaceType_Gpuin C, draws into a texture on the GPU. The texture shows in any window the panel moves to, without being made again. - Draw into it with the gpu standard plugin, from Lua or C: shapes, textures, text, and your own shaders.
- Or draw into it with SDL's GPU API in C.
ECSGpu_GetDevice()gives the GPU device, and the surface gives the texture. ECSSurface_OnDrawnruns a function once a panel's draw returns, so a service that draws into surfaces can finish its work itself.
Run work on threads. ecs.worker.start{ file = "count.lua", input = 1000, message = ..., done = ... } runs a Lua script on a thread of its own, in a Lua state of its own, so the panels stay free while it works.
- Values go both ways as copies:
worker:send(value)and, in the script,ecs.worker.receive()andecs.worker.send(value). - The plugin's
messageanddonefunctions get them on the main thread. worker:stop()ends the script. OpenECS stops every worker and waits for it before it exits.
Pass more between plugins.
- Kept functions: a signature can take
keep fn<signature>, a function that stays valid after the call, such as a function to call when a download is done.ECSService_ReleaseCallbacklets it go. - Buffers and handles in values: events, saved state and generic values can hold bytes and handles. In Lua, a text with a zero byte becomes a buffer, and a handle stays a handle.
- Methods on handles:
ECSHandle_AddMethod, andecs.handle.addMethodin Lua, make a function a method of a handle type, so Lua writesconnection:send(data)fornet.send(connection, data). - Typed values: a signature can name a value's Lua type, such as
value<ui.ButtonProps>. A plugin'stypes.luadescribes those types, so your editor completes the tables you pass. - More for C plugins: a plugin's
header.hgoes into the definition header that--definitionswrites, as ui's macros do. A key event gives the key's name in C too, so C code needs no SDL to read it.
Answer questions in OpenECS's own dialogs. Message dialogs, such as the question about unsaved work, are drawn by OpenECS over its window, in place of the system's message boxes. Return, Space, the arrows, Tab and Escape answer them, or a click.
Go to another tool from any tool. Every tool loads the launcher. Alt+W, then / opens it, and lists your presets and saved sessions.
Help new users of your tool. A preset's hint, such as "Drag to draw; Ctrl+Z undoes", shows in the title bar after the tool's name.
Test more.
test.pixel(x, y)gives the colour that the window shows at a point, also over a GPU panel.test.dialog()gives the dialog that waits for an answer, and the test answers it with keys or clicks.test.keyEventsends one press or release of a key, with its time, as an input method does.- The tests of GPU panels run on Mesa's software Vulkan driver, with no graphics card.
Find input problems. --log-input logs each key and text event as SDL gives it.
Small fixes
- An input method that repeats a held key, such as fcitx5 on Wayland, no longer types it twice.
- Text that comes without a key press, such as an input method's, is no longer lost after a key binding with Ctrl, Alt or Super.
- Key combinations of keys whose names hold a +, such as Ctrl++, work.
- A call from Lua that leaves out its last arguments gets nil for them.
- A handle made while another handle of the same object waits to be collected no longer loses its object.
- A plugin's Destroy can still call other plugins' functions.
- Building from source is faster: shuild compiles a module's files in parallel, as many at a time as there are processors. It also copies, lists and deletes files itself, so the build scripts no longer run
cp,find,cmporrm.
What will break
Names with abbreviations. Abbreviations are written in capitals:
- In C,
ECSPanel_GetIDreplacesECSPanel_GetId. - The lists of presets and sessions give
appID, in place ofappId.
Keys.
- The panel list opens on Alt+W, then
., in place of Alt+W, then N. - The launcher opens on Alt+W, then
/. - A settings file that set
Nfor the panel list keeps working. Remove it to use..
The launcher. launcher.open now opens the launcher, and launcher.start starts the chosen entry, as OpenECS-std 0.3.0 says.
Examples. 18_first_party is now 19_first_party.
Tests. The tests need a Vulkan driver for the GPU panels of 21_gpu: one for your graphics card, or Mesa's software one, such as mesa-vulkan-drivers on Debian and Ubuntu.
Downloads
openecs-0.3.0-linux-x86_64.tar.gz: the program with SDL's libraries, its plugins, presets and examples, the plugin interface, and the licenses. Unpack it and runOpenECS.openecs-0.3.0-source.tar.gz: the source with every library it uses. GitHub's own "Source code" archives leave the libraries out, so use this one to build.SHA256SUMS: checksums of the archives.
Only Linux on x86_64 has a build. It needs glibc 2.38 or later, such as Ubuntu 24.04 or Fedora 39.
OpenECS is under the zlib license.
OpenECS 0.2.0
OpenECS 0.2.0 adds standard plugins that your plugins can build on: drawing, user interfaces, character grids, images, sound, networking, 3D models and files. It also adds a settings window, a launcher, a list of panel types, pop-out windows and popups, dark and light themes, window frames drawn by OpenECS, and simpler settings and keys.
It comes out with the first releases of two repositories that OpenECS ships, each described in its own release:
- OpenECS-std 0.2.0: the standard plugins, the settings window and the launcher.
- OpenECS-examples 0.2.0: eighteen examples, from a first Lua plugin to a drawing tool, one for each standard plugin, and one with the first-party plugins. They are OpenECS's tests too.
This is still an early release. Plugins made for 0.1.0 need the changes under "What will break".
What you can do
Start from the launcher.
- Run
OpenECSwith no preset, and the launcher lists your presets and saved sessions. Click one, or choose it with the arrows and Return. - Run
OpenECS --helpto see the options. Each has a short form:-pfor--preset,-sfor--session,-ffor--fresh, and so on.
Change settings in a window.
- Press Alt+W, then
,to open the settings window. It lists every setting of the core and the plugins, with a control for each type. - A value that does not fit its setting's type shows as wrong, and is not saved.
- The window writes your settings file,
~/.config/openecs/settings.lua.
Open any panel. Press Alt+W, then N to list the panel types of the tool, by plugin, and open one where the focused panel is.
Arrange panels across windows.
- Press Alt+W, then P to move a panel into a window of its own. Sessions keep these windows.
- Press Alt+W, then W to choose a workspace from a menu.
- Press Alt+W, then Shift+R to reset the layout to the preset's, and Alt+W, then Q to quit. Every right-click menu ends with both.
- Closing the last panel quits the tool, and the next start opens its preset.
- Locked and maximized groups show a mark at the end of their tab row.
Choose dark or light. OpenECS follows your system's dark or light mode, and changes with it. Set ecs.theme to "dark" or "light" to choose one. Your settings file can change a theme's colours, and plugins name the theme's colours, such as "accent", so they follow it too.
Move and resize every window. OpenECS draws its windows' title bars, with buttons that minimize, maximize and close, and edges that resize, so they work the same on every desktop, also on the ones that draw no frames. Set ecs.titleBar to false to leave the frames to the system.
Keep your work, when you want to.
- A tool now starts from its preset each time. To get your last session back at the next start, set
["ecs.keepSession"] = truein your settings file. - Alt+W, then S saves the session to a file whenever you want.
Build plugins on the standard plugins. They ship in the archive's plugins/ folder: draw, mixer, ui, textgrid, image, audio, net, gltf and fs. OpenECS-std 0.2.0 says what each does. A standard plugin needs nothing but OpenECS, so copying its folder installs it.
Use other plugins' functions easily.
- In Lua,
local draw = require("draw")gives the functions of the plugindraw, when your manifest depends on it. OpenECS --definitions FOLDERwrites a file for each plugin it finds:NAME.luafor your editor's completion and checks, andNAME.hfor C plugins, with typed functions.- The archive's
include/holds these files for the standard plugins, so withinclude/in your editor'sworkspace.library,require("ui")completes with no more setup. Building from source writes them too, with a.luarc.jsonthat names them. - Function signatures can name their parameters, such as
void(string path, float volume), and those names show in your editor.
Write richer panels.
- Panels can take typed text, with the input method's help, such as for accented letters.
- Panels can open popups: menus and tooltips next to a part of the panel.
surface:fill(x, y, width, height, color)in Lua, andECSSurface_Fillin C, fill a rectangle in one call.ECS_LogInfo(plugin, ...)and its siblings log at one level in C.ecs.plugin.foldergives the folder a plugin was loaded from, so it can read its own files.- Lua plugins have all of Lua's standard libraries:
ioreads and writes files, andosrenames and removes them. The fs plugin lists and makes folders. - Add
---@type ecs.Presetor---@type ecs.Manifestabove thereturnof a preset or a manifest, and your editor completes and checks it.
Learn from the examples. The archive's examples/ folder holds them, each a preset with its plugins and a test; OpenECS-examples 0.2.0 lists them. Run one with OpenECS --fresh --preset examples/1_hello/preset.lua; --fresh starts it from its preset, even when ecs.keepSession is on.
Small fixes
- A failed start shows the step that failed, the file, the error, and where the log file is.
- A missing plugin, or one that fails to load, is logged as an error, and the program goes on; its panels show placeholders.
- A manifest or preset with a wrong structure, such as a missing field or dependencies in a cycle, stops the start with an error that names the file and the field.
- On Wayland, a panel dragged onto another of the tool's windows lands there, and frames are paced by OpenECS, which ends pauses of a few seconds.
- Right-click menus are narrower: their entries are short.
- While you type in a panel, letter keys never run key bindings.
- The session's save dialog suggests a file named after the preset.
- Closing a pop-out window frees the textures of its panels first, so a panel that moved out of it never draws with a freed texture.
What will break
Names. A plugin declares what it registers by its local name, and OpenECS adds the plugin's name: the plugin notes registers the panel type "editor", which presets and other plugins name "notes.editor". This holds for panel types, settings, functions, handle types and events. In Lua, ecs.service.register(functions) no longer takes the plugin's name. Looking up, emitting, subscribing and binding keys still take full names.
Manifests.
type = "native"ortype = "lua"replaces the fieldsnativeandlua. A native plugin's library islib<name>.soin its folder, and a Lua plugin starts ininit.lua.name,version,apiandtypeare required, andnamemust be the folder's name. A preset'sdependsis required.
A plugin's own life. ECSPlugin_Register(plugin, &desc) with an ECSPluginDesc, and ecs.plugin.register(desc) in Lua, describe what a plugin saves in sessions and what it does before the program exits. They replace ECSPlugin_Shutdown, ECSPlugin_RegisterState, ecs.plugin.registerState and ecs.plugin.onShutdown.
Panels in Lua. A panel's data are fields: panel.title, which you can set, panel.unsaved, which you can set, panel.id and panel.type. getTitle, setTitle, getId, getType and setUnsaved are gone, and so are the copies of panel methods in ecs.panel and the table ecs.popup.
Colours. In Lua, colours are texts: "#RRGGBB", "#RRGGBBAA" or a colour of the theme, such as "text". In C they are ECSColor, and ECSColor_Parse reads texts. A function signature can take the type color.
Keys. Every keys table has one shape now. A field is a key combination, and its value is the name of a function to run, or false to remove the key. The field prefix holds the keys after Alt+W, and a field named after a panel type holds that panel type's keys:
keys = {
["Ctrl+N"] = "notes.new",
prefix = { ["N"] = "notes.new" },
["notes.editor"] = { ["Ctrl+B"] = "notes.bold" },
}- In settings files and presets, move the keys of
ecs.prefixKeysintokeys.prefix. ECSKey_Bind(plugin, panelType, key, function)andecs.input.bind(panelType, key, function)now take a key combination, such as"Ctrl+N", instead of the name of a key setting.
Settings.
- There are three settings layers: the defaults, the preset, and your settings file.
- A
keyorcolorvalue that cannot be read is reported, and the default is used. Colours are written"#RRGGBB"or"#RRGGBBAA".
Sessions. A tool no longer restores its last session unless ecs.keepSession is on.
Command line. An unknown option, or an option without its value, is an error: OpenECS prints the help and exits with status 2.
Plugins and presets moved.
- The sketch plugins and their preset are now the example
examples/12_sketch/. - The standard plugins, the settings window and the launcher are in OpenECS-std, and the examples are in OpenECS-examples. Both are submodules of OpenECS, in
std/andexamples/. Clone OpenECS with--recursive.
Building from source.
shuild -b TYPEchooses the build type:debug,release,relwithdebinfoorminsizerel. The--staticand--dynamicoptions are gone.- The build goes to
build/TYPE/, such asbuild/Release/. - The build builds the standard plugins of
std/too, with their ownshuild.c;-nleaves them out.-ebuilds the examples ofexamples/the same way. - The examples are the tests:
.github/scripts/test.sh build/Debug/bin/OpenECSruns every example's test. A test loads only the plugins its preset names.
Downloads
openecs-0.2.0-linux-x86_64.tar.gz: the program wi...
OpenECS 0.1.0
This is the first release of OpenECS, an empty shell for editor-style programs. You arrange panels, and plugins decide what each panel shows and does. A preset names the plugins and the arrangement, so one program can become a paint tool, a text editor or the front end of a game engine.
This is an early release. It works and you can build on it, but the plugin interface will still change before 1.0.
What you can do
Arrange panels.
- Split, group into tabs, maximize and lock panels.
- Drag a tab or a panel's grip to dock it beside another panel or along an edge of the window.
- Switch between the preset's workspaces, each with its own arrangement.
- Right-click a tab or a grip for the panel's menu.
Use the keyboard.
- Press Alt+W to see the core's keys, then press one: arrows move the focus, Shift with an arrow moves the panel, M maximizes, X closes, 1 to 0 switch workspaces.
- Press S after Alt+W to save the session to a file, or O to open a saved one.
Keep your work.
- When you quit, OpenECS remembers the arrangement and every panel's state, and brings them back next time.
- Files named on the command line, as in
OpenECS strokes.txt, go to the preset's open function. - Put your own presets in
~/.config/openecs/presets/and start one by its name:OpenECS --preset paint.
Change the settings.
- Put your own settings and keys in
~/.config/openecs/settings.lua. - They override the preset's, and the preset's override the plugins' and the core's defaults in
resources/settings.lua.
Write plugins in C or Lua.
- Plugins add panel types, functions other plugins can call, events, settings, keys and saved state.
- They also get timers, the clipboard, file and message dialogs, and drag and drop of data between panels, including files and text from other applications.
- Lua plugins start with
local ecs = require("ecs"). A Lua plugin can have several files:require("parts.shapes")loadsparts/shapes.luafrom the plugin's folder. - Plugins can list the presets and saved sessions with
ecs.session.presets()andecs.session.sessions(), and switch to one withecs.session.openPresetorecs.session.open. - Every function a key can run is also a function of that module, such as
ecs.layout.maximize(). - The archive's
include/folder holdsOpenECS.hfor C plugins andecs.luafor your editor: add it toworkspace.libraryin your plugin's.luarc.json, and VS Code completes and checks your calls toecs.
Try the example. The default preset opens two example plugins that do the same things:
sketch_cin C andsketch_luain Lua, so you can compare their code.- Draw with the mouse, and change the brush size with the wheel.
- Copy and paste strokes with Ctrl+C and Ctrl+V, also between the two plugins.
- Hold Shift and drag to carry a canvas's strokes to another canvas, and drop a strokes file from your file manager onto a canvas.
What is not there yet
- Panels cannot move into a window of their own yet, and there are no popups and no GPU-drawn panels.
- There is no settings window and no launcher yet.
- Only Linux on x86_64 has a build. It needs glibc 2.38 or later, such as Ubuntu 24.04 or Fedora 39.
What will break
Nothing breaks, because this is the first release. Until 1.0, a new minor release, such as 0.2.0, may change the plugin interface, the ecs module, the names of settings and keys, or the format of presets and sessions. Its description will say what changed and how to update your plugins and files.
Downloads
openecs-0.1.0-linux-x86_64.tar.gz: the program with SDL's libraries, its plugins and presets, the plugin interface, and the licenses. Unpack it and runOpenECS.openecs-0.1.0-source.tar.gz: the source with every library it uses. GitHub's own "Source code" archives leave the libraries out, so use this one to build.SHA256SUMS: checksums of the archives.
OpenECS is under the zlib license.