{"id":15220481,"url":"https://github.com/akbs-org/akbs","last_synced_at":"2026-01-19T02:32:26.839Z","repository":{"id":124533094,"uuid":"610915059","full_name":"akbs-org/akbs","owner":"akbs-org","description":"A super quick build system for C, C++ and ASM","archived":false,"fork":false,"pushed_at":"2023-03-30T20:38:39.000Z","size":22,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T22:42:01.622Z","etag":null,"topics":["akbs","asm","assembler","assembly","att-assembly","build","c","collaborate","compiler","cpp","cxx","fast","github","intel-assembly","interpreter","linker","python","python3","quick","speed"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akbs-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-07T18:31:21.000Z","updated_at":"2023-11-12T19:17:04.000Z","dependencies_parsed_at":"2023-07-07T10:32:02.704Z","dependency_job_id":null,"html_url":"https://github.com/akbs-org/akbs","commit_stats":null,"previous_names":["aaravmalani/akbs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akbs-org%2Fakbs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akbs-org%2Fakbs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akbs-org%2Fakbs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akbs-org%2Fakbs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akbs-org","download_url":"https://codeload.github.com/akbs-org/akbs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271527,"owners_count":20911587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["akbs","asm","assembler","assembly","att-assembly","build","c","collaborate","compiler","cpp","cxx","fast","github","intel-assembly","interpreter","linker","python","python3","quick","speed"],"created_at":"2024-09-28T13:10:43.404Z","updated_at":"2026-01-19T02:32:26.834Z","avatar_url":"https://github.com/akbs-org.png","language":"Python","readme":"# AKBS: The **A**ll **K**nowing **B**uild **S**ystem for C, C++ and Assembly\n\n## Requirements\nPython 3\u003e=\n\n## Installation\n```bash\n# Linux\npython3 -m pip install akbs\n# Windows (UNSUPPORTED!)\npython -m pip install akbs\n\n\n# Usage\npython3 -m akbs\n```\n## Speed\nTo test the build system, I made a build script for [basic_math_operations](https://github.com/avighnac/basic_math_operations),\n\n**Operating System**: Debian Bullseye\n**Host**: Linux 5.10.102.1-microsoft-standard-WSL2\n**Architecture**: x86_64\n\n**AKBS**: \nVersion: 1.0.5\nTime: 1.351s\n\n**CMake w/ Makefile**:\nCMake Version: 3.26.0\nMake Version: 4.3\nTime: 3.360s\n\n**CMake w/ Ninja**:\nCMake Version: 3.26.0\nNinja Version: 1.11.1\nTime: 2.750s\n\nThe `build.akbs` file is as follows\n```\nset(C_STD, 17)\nset(CXX_STD, 17)\nset(FILES, wildcard$(src/library/**/*.cpp) wildcard$(src/library/**/*.c))\nset(OUTPUT_DIR, dist)\nset(BUILD_DIR, build)\n\nif(eq$($PLATFORM, POSIX))\nset(FILES, wildcard$(src/library/linux/*.asm) remove$($FILES, src/library/cross-platform/addp.c, src/library/cross-platform/multiply_whole.c))\nendif\n\ncheck_for(C, CXX, ASM_INTEL, SHARED, STATIC)\n\nset(OUTPUT, libbasic_math_operations.so)\ncompile(SHARED, $FILES)\nset(OUTPUT, libbasic_math_operations.a)\ncompile(STATIC, $FILES)\n```\n**Note:** The `remove$()` helper function is used because the `multiply_whole` and `addp` functions are already present in Assembly for Linux, not for Windows\n\n## How do you use AKBS?\nBy default, the build script is called `build.akbs`, similar to `Makefile` and `CMakeLists.txt`\nHowever, you can use the `--file` option to specify a file\n\nTo enable languages, you use the `check_for` function\n```\ncheck_for(C, CXX, ASM_INTEL, ASM_ATT, STATIC, SHARED)\n```\nRight now, only these 4 languages (and a static and shared library linker) (3 if you count AT\u0026T and Intel syntax Assembly as one language) are supported\n\nIf you want to set the standard of C and C++, set the C_STD or CXX_STD variable\n```\nset(C_STD, 17)\nset(CXX_STD, 17)\n```\n\nTo compile a list of files, use the compile function\n```\ncompile(SHARED/STATIC, src/a.c src/b.c src/c.c)\n```\n\nTo print a statement you can use the print function and to exit a program, use exit\n```\nprint($PLATFORM)\nexit(1)\n```\nTo use a variable, use `$VARIABLENAME`\n\nThe `$PLATFORM` variable comes predefined and is set to `os.name`\n\nFor conditions, use if (else and else if are not implemented yet) and endif.\n\n```\nif(set$(PLATFORM))\nprint($PLATFORM)\nif(eq$($PLATFORM, UNIX))\nprint Yay, we're in UNIX land\nendif\nendif\n```\n\nAlso, there is a rudimentary pre-processor, with `%define`\n\n```\n%define ifend endif\nif(set$(PLATFORM))\nifend\n```\n\nComments work by adding a semi-colon at the start of the line\n```\n; these   \n; lines   \n; will    \n; be      \n; skipped \n\n```\n\nComments will also work at the end of a line\n```\nprint($PLATFORM) ; this text will be ignored, and is merely a comment\n```\n\nThere is also a list of helper functions\n\n| Function Name | Arguments | Description | Introduced\n|---|---|---|---|\n| wildcard$ | str1 | Evaluates a list of space separated globs into a space separated list of files | v1.0.0\n| remove$ | str1, str2, str3... | Removes str2 onwards from a space separated list of strings | v1.0.0\n| replace$ | str1, str2, str3... | Replaces str2,4,6,8... with str3,5,7,9... in str1 | v1.0.3\n| eq$ | arg1, arg2 | Checks if two strings are equal | v1.0.0\n| neq$ | arg1, arg2 | Checks if two strings are unequal | v1.0.3\n| gt$ | arg1, arg2 | Checks if arg1 is greater than arg2 | v1.0.3\n| lt$ | arg1, arg2 | Checks if arg1 is lesser than arg2 | v1.0.3\n| gte$ | arg1, arg2 | Checks if arg1 is greater than or equal to arg2 | v1.0.3\n| lte$ | arg1, arg2 | Checks if arg1 is lesser than or equal to arg2 | v1.0.3\n| set$ | arg1 | | Checks if there is a variable with the name arg1 | v1.0.3 \n| notset$ | arg1 | Checks if there is not a variable with the name arg1 | v1.0.3 \n| and$ | arg1, arg2, arg3... | Ands all the booleans | v1.0.4\n| or$ | arg1, arg2, arg3... | Ors all the booleans | v1.0.4\n| not$ | arg1 | Nots the boolean | v1.0.4\n\n\nA list of important variables are\n| Variable | Is Set | Description | Introduced |\n|---|---|---|---|\n| PLATFORM | Yes | Equivalent of `os.name` | v1.0.0 |\n| C_COMPILER | No | C compiler location set by `check_for` | v1.0.0 |\n| CXX_COMPILER | No | C++ compiler location set by `check_for` | v1.0.0 |\n| ASM_INTEL_COMPILER | No | Intel Assembly assembler location set by `check_for` | v1.0.0 |\n| ASM_ATT_COMPILER | No | AT\u0026T Assembly assembler location set by `check_for` | v1.0.0 |\n| SHARED_COMPILER | No | Linker location for shared libraries set by `check_for` | v1.0.0 |\n| STATIC_COMPILER | No | Linker location for static libraries set by `check_for` | v1.0.2 |\n| OUTPUT | No | Output file generated by linking | v1.0.0 |\n| C_STD | No | The C std used (just the number like 17, 11, etc.) | v1.0.0 |\n| CXX_STD | No | The C++ std used (just the number like 17, 11, etc.) | v1.0.0 |\n| BUILD_DIR | No | The directory to build the objects in | v1.0.1 |\n| OUTPUT_DIR | No | The directory to output the finished objects in in | v1.0.1 |\n| C_FLAGS | No | Flags passed to C compiler | v1.0.2 |\n| CXX_FLAGS | No | Flags passed to C++ compiler | v1.0.2 |\n| ASM_INTEL_FLAGS | No | Flags passed to Intel Assembly assembler | v1.0.2 |\n| ASM_ATT_FLAGS | No | Flags passed to AT\u0026T Assembly assembler | v1.0.2 |\n| SHARED_FLAGS | No | Flags passed to shared library linker | v1.0.2 |\n| STATIC_FLAGS | No | Flags passed to static library linker | v1.0.2 |\n\n## How to clean the files\n```bash\npython3 -m akbs --clean\n```\n\n## To-Do\n* [x] Build directory (milestone 1.0.1)\n* [x] Nested functions\n* [ ] Windows support\n* [ ] Optimization\n* [x] Subdirectories\n* [x] Ability to set compilers from `set()` and environment variables\n* [x] More if conditions\n* [x] `replace$()` helper function\n* [x] --clean command\n* [x] Documenting my code + Readable variables\n* [x] C_FLAGS, CXX_FLAGS, ASM...\n* [x] Cache install locations (milestone 1.0.2)\n* [x] Ability to set target architecture (Use CFLAGS and CXXFLAGS)\n* [ ] Plugin Support\n* [x] Make `print` and `exit` a function, not a statement\n* [ ] Make comments work in the middle of a line","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakbs-org%2Fakbs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakbs-org%2Fakbs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakbs-org%2Fakbs/lists"}