cvm
c project description
status
description
- C memory management
static u64 read_data(u64 list_ptr, const char* prompt) { u64 data_ptr = 0; u64 ui_mode_ptr = string->load("UI_MODE"); u64 mode_ptr = string->load("--ui"); u64 value_ptr = os->getenv(ui_mode_ptr); if (ui_mode_ptr != 0 && string->strcmp(value_ptr, mode_ptr) != 0) { data_ptr = read_input(prompt); } else { printf(">%s:\n", prompt); data_ptr = list->pop(list_ptr); if (data_ptr == 0) { printf("\n"); } } return data_ptr;}
int main(void) { pointer->init(8); // initializes virtual memory manager with chunk size of 8
// some work with standard classes: os, string, data, etc.
pointer->gc(); // releases all resources added to GC pointer->destroy(); // releases virtual memory manager return 0;}
inspiration
vision
- managed (C programming language model)
- safe
- friendly
- extensibe
- simple
- tested (100% code coverage)
brief
-
VM managed types / C API
-
user defined types / extensibility system
- C API
- memory management
- garbage collection
-
development environment:
- WSL2/devcontainers
- Ubuntu 22.04.3 LTS
-
C API generated docs (doxygen):
media links
-
streaming channels
music credits
updates
-
2023
-
added v1 core Virtual Machine (vm1) with types:
-
added support including:
- file IO
- string manupulation methods
- search
-
features
implementationsList<T>- code coverage
- coverage hot-reload
- memory allocation playground
- automatic garbage collection implementation (GC)
- GTK GUI app demo ready to run on containerized environment
readme
repo is ready to run on containers, WSL, remote hosts.
remote development
- installation from git repo (manually)
Installs sources from git repo
eval `ssh-agent -s`git config --global user.name "$USER_NAME"git config --global user.email "$USER_EMAIL"git clone https://github.com/default-writer/c.git
clang
containers
manual installation (minimal install)
- init
Sets up primary/optional tools and git hooks
./bin/init.sh --setup./bin/init.sh --optional./bin/init.sh --hooks
- rexo
./bin/utils/install.sh --submodule-rexo
GTK GUI app development
setup
- add/update Visual Studio Code environment settings:
"environment": [ { "name": "UI_MODE", "value": "--ui" }]
- run command line build
cd gtk./bin/build.sh --target gtk-experiment1 --cleanUI_MODE=--ui ./build/gtk-experiment1
shell scripting documentation
all shell scripts
- are self-documented
- placed in ./bin folders
- detects execution as user or root (sudo)
- runs with required and optional command-line parameters
history
local repos
support C project
sponsorship
support this project become a sponsor
2023
- added support for classes / inheritance (oberon exaple)
- added GC implementation
- added several list implementations
2022
- playing around with visibility in class declarations
documentation
initialization
- ./bin/init.sh --setup- ./bin/init.sh --hooks- ./bin/init.sh --optional
doxygen generated documentation
C API PDF(refman.pdf)
referential documentation
- memory PDF(memory.pdf)
- list PDF(list.pdf)
- class PDF(class.pdf)
- history PDF(history)
- scripts PDF(scripts)
- labs PDF(labs)
resources
links
requirements
SAST Tools
PVS-Studio - static analyzer for C, C++, C#, and Java code.
Описание
Стандартная библиотека типов совместимая с C(С89, С99) и виртуальная машина предоставления API безопасного к типам данных на С. (библиотека служит оберткой для поддержки на С языка Go, используя управление памятью и абстракции типов и исключающей работу с указателями напрямую, может использоваться со сторонними менеджерами памяти)
Языки
C
- CMake
- Dockerfile
- Shell
- Makefile
- Starlark
- C++