jangko / razcal

Build cross platform desktop app with Lua, MoonScript, and Layout Language
MIT License
17 stars 3 forks source link
cassowary desktop-app framework layout layout-engine lua moonscript nim-lang

razcal

a cross platfrom desktop app framework written in Nim


A bit history

If you come here, you should already know something about electron, a big desktop app framework written in C++. Perhaps you also know CEF, electron minus node.js.

Well, I used them both in the past, and some of my project still depend on earlier version of CEF, but they grow up immensely, adding much features I don't need at all. Building the binary myself already a nightmare, removing unneeded features is worse.

Then I stumbled upon Layx, a layout language written in javascript. Then I thought, hey, why not we have something like electron/CEF, but lightweight and hackable. And of course, don't use xml-like whatsoever for the layout, we already have too much xml-like language to describe GUI.

That is how razcal idea was born, written in Nim, using Layx inspired layout language, scripted by MoonScript on top of Lua vm. Currently using kiwi as it's constraint solver algorithm. Thanks to Nim powerful metaprogramming feature, binding to Lua is easy, razcal use nimLUA to automate binding process interleaved with hand coded glue code.

You might be tempted to say this is an overly ambitious project. Using new emerging language like Nim and MoonScript, plus a home brew layout language, what kind of hybrid mutant razcal will be?

I will be nice, you can choose what component to be included in your final executable, you can add more functionality either using Nim, Lua, or MoonScript as a module. It already and always be easy to build.

Interesting facts

And I'm thinking to use Yaml as configuration script, which is also use indentation based syntax. Python?, hmm....., the standard Python is too big, perhaps MicroPython is more suitable.

Construction phase

The first phase already done. Now we can move to the next construction phase, a lot of work to do: