SDK v2 released

Posted 08 Jul 2017 by Drew DeVault

Though KnightOS development is slow, it is steady. The project never dies, despite long periods of stagnation, because every so often someone comes around and works on some new features that inspire others (myself included) to stir from idleness and contribute for a while.

In this case, the feature was decimal floating point support, contributed by new contributor ajcord. This feature deserves its own blog post, but first I want to announce a more user-visible change that occurred as a result: SDK v2. For some time now, I’ve wanted to do some heavy refactoring on the KnightOS SDK, and I was inspired to do so before I took ajcord’s work and build a calculator app with the old SDK.

The new SDK has a much cleaner codebase, and is much more flexible and amenable to new features. The v1 series was one of my first Python projects, and even then I knew it was bad. With a few more years of Python experience stirred in, v2 is much nicer. Done away is the project.py megafile, and now workspaces, dependencies, and templates are all managed by isolated modules.

New user-facing features include an offline cache of packages and kernels, which are symlinked into workspaces. The old approach required an internet connection and re-downloaded kernels and packages for every project you were working on. The other major feature is a long-requested one: the ability to build local copies of your dependencies instead of manually building them and copying them into .knightos/packages. Now, you can just use knightos install core/corelib --local-path=../corelib and it will automatically build ../corelib when compiling your project.

Click here for instructions for installing or updating the KnightOS SDK.

In other news, KnightOS turned 8 years old last month! Thanks to ajcord, it’ll finally be possible to use your calculator to do math with KnightOS soon. Another blog post will come soon with the details.