Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OnyxApps CI

RISC-V 64 C99 OnyxCC GPL-3.0

    ███████
  ███▒▒▒▒▒███
 ███     ▒▒███ ████████   █████ ████ █████ █████
▒███      ▒███▒▒███▒▒███ ▒▒███ ▒███ ▒▒███ ▒▒███
▒███      ▒███ ▒███ ▒███  ▒███ ▒███  ▒▒▒█████▒
▒▒███     ███  ▒███ ▒███  ▒███ ▒███   ███▒▒▒███
 ▒▒▒███████▒   ████ █████ ▒▒███████  █████ █████
   ▒▒▒▒▒▒▒    ▒▒▒▒ ▒▒▒▒▒   ▒▒▒▒▒███ ▒▒▒▒▒ ▒▒▒▒▒
                           ███ ▒███
                          ▒▒██████
                           ▒▒▒▒▒▒
 ████████
██▒▒▒▒▒▒███ ████ █████  █████████  █████████
███▒▒▒▒▒███▒▒███ ▒▒███ ▒██▒▒▒▒▒▒███▒▒███▒▒▒▒███
███████████ ▒███  ▒███ ▒██▒▒▒▒▒▒███▒██████████
██▒▒▒▒▒▒███ █████ █████▒██▒▒▒▒▒▒███ ▒▒███████
██▒▒▒▒▒▒███▒███▒▒▒ ▒███ ▒██▒▒▒▒▒▒███  ████████
███▒▒▒▒▒███▒███▒▒▒ ▒███ ███████████▒███▒▒▒▒▒
███▒▒▒▒▒███▒███▒▒▒ ▒███ ▒███▒▒▒▒▒▒ ▒███▒▒▒▒▒
 ▒▒███████▒ ▒▒███████▒  ▒▒█████████  ▒▒███████
  ▒▒▒▒▒▒▒    ▒▒▒▒▒▒▒    ▒▒▒▒▒▒▒▒▒    ▒▒▒▒▒▒▒

Optional userland applications for OnyxOS, written in C99


OnyxApps is the single repository for every optional userspace program of OnyxOS, written in C99 and compiled to .onx executables by the project's own self-hosting compiler (OnyxCC) against libonyxc (stdio / termios / string / stdlib).

One repo for all apps: every program is a self-contained directory under apps/, the CI builds all of them with the same pinned compiler and publishes .onx artifacts, so there is no per-app repository and no artifact-sync overhead. The system components stay in their own repos: OnyxKernel, OnyxBoot, OnyxShell, OnyxCompiller and the OnyxOS image orchestrator.


Key Features

  • One repo, many apps - a new program is a directory, not a repository
  • OnyxCC pipeline - onyxcc links libonyxc automatically, no extra flags
  • Enforced layout - max 4 files per folder, max 200 lines per file, KISS/DRY
  • CI-built artifacts - every push rebuilds all apps and uploads .onx files

Apps

App Source Docs Description
vim apps/vim apps/vim/README.md Modal text editor (vim-inspired)
oed apps/oed apps/oed/README.md Full-screen text editor (nano-style)
osysmon apps/osysmon apps/osysmon/README.md System monitor (btop/htop-style)

Full documentation lives in each app's own README.md; this file covers the monorepo only.

Layout rules (project-wide)

  • max 4 files per folder - one folder = one subsystem
  • max 200 lines per file - one responsibility per file
  • KISS / DRY - shared logic lives in exactly one place

Reference structure (apps/vim):

apps/vim/
├── vim.h            shared state (extern) + full API
├── main.c           program entry: args + editor loop
├── core/            state.c  buffer.c  undo.c  fileio.c
│                    (buffer state, edit primitives, undo/redo, load/save)
├── ops/             registers.c  operators.c
│                    (yank/paste registers, d/c/y operators, indent)
├── text/            motions.c  search.c
│                    (word motions, %, pattern search, f/F/t/T)
├── mode/            keys.c  keys_motion.c  keys_edit.c  command.c
│                    (NORMAL dispatcher, motion keys, edit keys, : commands)
└── ui/              render.c  input.c
                     (drawing, cursor, raw term, key decoding)

Build

Requires onyxcc (built from OnyxCompiller: make -C OnyxCompiller).

make                                  # build every app into build/
make vim                              # build one app
ONYXCC=/path/to/onyxcc make           # custom compiler path

Each apps/<name>/ tree compiles to build/<name>.onx; run it on OnyxOS as vim [file].

Adding an app

  1. mkdir apps/myapp and put your *.c files there (self-contained; onyxcc links libonyxc automatically, no extra flags needed)
  2. CI picks it up automatically: syntax-check + real onyxcc build + .onx artifact. Add the app to the matrix lists in .github/workflows/ci.yml

CI

  • syntax-check - gcc -fsyntax-only against libonyxc headers (fast feedback, no toolchain build)
  • build - builds OnyxCC from source, compiles every app into .onx, validates the ONX1 magic, uploads artifacts


Related Projects

Project Description
OnyxOS RISC-V operating system (kernel + shell + bootloader + compiler)
OnyxKernel RISC-V 64-bit kernel for OnyxOS
OnyxShell POSIX-like shell for OnyxOS
OnyxBoot RISC-V bootloader for OnyxOS
OnyxCompiller Self-hosting C compiler used to build the apps

Licensed under GPL-3.0-or-later.

About

Userland applications for OnyxOS (vim editor, ...) — compiled to .onx with OnyxCC

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages