{"id":40079095,"url":"https://github.com/nsauzede/ns_vade","last_synced_at":"2026-01-19T09:04:29.671Z","repository":{"id":60309239,"uuid":"107776455","full_name":"nsauzede/ns_vade","owner":"nsauzede","description":"🧰 Source management tooling based on GNU Make, GCC, Python and other standard tools","archived":false,"fork":false,"pushed_at":"2024-05-01T07:18:43.000Z","size":157,"stargazers_count":4,"open_issues_count":6,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-01T08:30:44.606Z","etag":null,"topics":["c","hacktoberfest","python","tdd","vade","vlang"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nsauzede.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2017-10-21T11:59:54.000Z","updated_at":"2024-05-01T07:18:47.000Z","dependencies_parsed_at":"2023-11-18T02:10:28.828Z","dependency_job_id":"b7baa613-6631-4a6e-9d18-a52f302591d1","html_url":"https://github.com/nsauzede/ns_vade","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/nsauzede/ns_vade","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsauzede%2Fns_vade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsauzede%2Fns_vade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsauzede%2Fns_vade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsauzede%2Fns_vade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nsauzede","download_url":"https://codeload.github.com/nsauzede/ns_vade/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsauzede%2Fns_vade/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28565001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T08:53:44.001Z","status":"ssl_error","status_checked_at":"2026-01-19T08:52:40.245Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["c","hacktoberfest","python","tdd","vade","vlang"],"created_at":"2026-01-19T09:04:28.788Z","updated_at":"2026-01-19T09:04:29.663Z","avatar_url":"https://github.com/nsauzede.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vade : Lightweight toolchain on top of standard tools\n[![Build Status][WorkflowBadge]][WorkflowUrl]\n\nVade is a lightweight toolchain on top of standard tools to make it easier to build and test a project's source packages.\n\nPrimarily aimed at the `C language`, it removes the need to write and maintain boring Makefiles or CMakeLists.txt, by automatically generating dependencies.\nPreliminary support for vlang if `v` available. (tests only for now)\n\nTDD-driven, Go-inspired (golang), it is based on `GNU Make`, `Gcc`, `Python` and `Bash`.\nIt uses `Git` as a convenience to locate the project root, allowing use anywhere below.\nAlso, if `Valgrind` and/or `Gcov` are available, they're used for automatic memleaks detection and test coverage report.\nTcc and Clang are also supported, with caveats:\n- tcc disables coverage (lack of gcov support) and stdarg (missing __va_arg when linking final binary with gcc)\n- clang disables valgrind (seems like it doesn't produce suitable dwarf2 ?)\n\nNEW: A handy [vade project github template](https://github.com/nsauzede/ns_vade_template) can be used to speed new vade project creation.\n\n## Projects using vade\n- [x] https://github.com/nsauzede/myem\n- [x] https://github.com/nsauzede/ns_hash\n- [x] https://github.com/nsauzede/ns_barebOneS\n- [x] https://github.com/nsauzede/ns_modc\n\n## What is it\nThis project started as a joke, to see if similar features of the go tool could be applied using only standard tools,\nfor simple C/C++ sources, such automatic dependencies for building, test framework, etc..\n\nThe golang tooling uses a simple, yet effective code methodology (https://golang.org/doc/code.html).\nVade tries to bring its cool features (easy build, lightweight test, ..) for C (C++) language.\n\nWhat it's not : a full replacement for Makefiles, especially for complex programs using fancy\nCFLAGS/CXXFLAGS/LDFLAGS.\nIt is mainly targetting C; for C++ it might be more appropriate to use other tools, eg: GoogleTest.\nIt can also handle assembly files with NASM to produce bare binaries.\n\nIt's suitable for simple (yet potentially interdependent) packages.\nThe only caveat is your packages can't depend on external libraries (eg: libz, which would need manual LDLIBS+=-lz).\nFor now these limitations are not addressed.\n\n## Install\nHow to install vade for use:\n1) Clone vade repository somewhere (eg: ~/git/ns_vade)\n2) Add \"[ -f ~/git/ns_vade/bin/vade ] \u0026\u0026 . ~/git/ns_vade/bin/vade\" to your ~/.bashrc\n\n(ofc, replace `~/git/ns_vade` to wherever you cloned vade)\n\nThis will both add 'vade' cmd to your path and setup autocompletion:\n```\n$ vade \u003ctab\u003e\u003ctab\u003e\nbuild  clean  help   test\n$ vade help\nVade is a tool for managing gcc* source code. (*C, C++, assembly, etc..)\n\nUsage:\n\n    vade command [arguments]\n\nThe commands are:\n\n    help [cmd]  Show this help (or cmd help)\n    version             Show vade version\n    new         Create a new source package\n    build               Build packages\n    clean               Remove build files\n    test                Test packages (default: all, or select a set by defining P)\n```\n\n\nFrom now on you can start using vade in your project, which should be organised like this:\n```\n\u003cproject root\u003e/vade/src/\u003cpkg1\u003e/*.{h,c,cpp}\n                       /\u003cpkg2\u003e/*.{h,c,cpp}\n                       /...\n```\nBut `vade` provides the `new` command to simplify new package creation (see below)\n\nBy default it will locate your project's root based on the .git/ location if it's a git repo.\nOtherwise, you can use VADEPATH env var similar to GOPATH.\n\n## Create a new package\nTo create a new package (C by default) in the current vade project root:\n```\n$ vade new cool/pkg\n```\nThen one can tinker with `vade/src/cool/pkg` sources:\n```\n$ ls vade/src/cool/pkg\npkg.c  pkg.h  pkg_test.c\n```\nSuch a freshly created package will be automatically built/tested (see below)\n\n## Building packages\nIn order to build all project's packages and dependencies:\n```\n$ vade clean build\n    RM  vade/target\n    CC  bar.o\n    AR  bar.a\n    CC  foo.o\n    AR  foo.a\n    AR  libbar.a\n    CC  bar_test.o\n    CC  test.o\n    AR  bar_test.a\n    AR  libbar_test.a\n    CXX bar_test.exe\n    CC  baz.o\n    AR  baz.a\n    AR  libbaz.a\n    CXX baz.exe\n    CXX bazcpp.o\n    AR  bazcpp.a\n    AR  libbazcpp.a\n    CXX bazcpp_test.o\n    CC  test.o\n    AR  bazcpp_test.a\n    AR  libbazcpp_test.a\n    CXX bazcpp_test.exe\n    AR  libfoo.a\n    CC  foobis_test.o\n    CC  foo_test.o\n    CXX foocpp_test.o\n    CC  test.o\n    AR  foo_test.a\n    AR  libfoo_test.a\n    CXX foo_test.exe\n```\n\nNot that if one of the packages is a standalone executable tool (ie: it contains the symbol `main`) then\nsuch an executable is ready to execute in `vade/target/bin/\u003cpkg\u003e/\u003cpkg.exe\u003e`, eg:\n```\n$ vade/target/bin/baz/baz.exe\nHello baz!\n```\n\nOtherwise, the package is considered to be a library, than can be linked to other project, eg:\n```\n$ file vade/target/pkg/bar/libbar.a\nvade/target/pkg/bar/libbar.a: thin archive with 2 symbol entries\n```\n\nNote that vade build support smart incremental (re)builds.\n(ie: gcc dependency files are automatically generated and use, so changes to impl or header files trigger recompilation)\n\nAdditional parameters after the last command (eg: build) are passed to Makefile (eg: CXXSTD=c++11, V=1, etc..)\n\n## Testing packages\nUnit tests can be written in a given package, by adding test fixtures like this: `TEST_F(bar, Bar)`.\nThose can either be added in separate `vade/src/\u003cpkg\u003e/*_test.{c,cpp}` files, or even directly in package sources (see `vade/src/cbowling` for such an example).\nNote that the APIs and messages are heavily inspired from GoogleTest, refer to the provided `test` package in vade sources.\n\nHere is the way to test all packages after they've been built:\n```\n$ vade test\n    VGRUN       ./vade/target/bin/bazcpp/bazcpp_test.exe\n[==========] Running tests from test suite.\n[----------] Global test environment set-up.\n[ RUN      ] _Z19bazcpp_Test_BazCPP_Pv\n[       OK ] _Z19bazcpp_Test_BazCPP_Pv (0 ms)\n[----------] Global test environment tear-down\n[==========] 1 tests from test suite ran. (24 ms total)\n[  PASSED  ] 1 tests.\n    VGRUN       ./vade/target/bin/foo/foo_test.exe\n[==========] Running tests from test suite.\n[----------] Global test environment set-up.\n[ RUN      ] foo_Test_Foo_\n[       OK ] foo_Test_Foo_ (0 ms)\n[ RUN      ] foo_Test_Foo2_\n[       OK ] foo_Test_Foo2_ (0 ms)\n[ RUN      ] foo_Test_Foobis_\n[       OK ] foo_Test_Foobis_ (0 ms)\n[ RUN      ] foo_Test_Foobis2_\n[       OK ] foo_Test_Foobis2_ (0 ms)\n[ RUN      ] _Z16foo_Test_FooCPP_Pv\n[       OK ] _Z16foo_Test_FooCPP_Pv (0 ms)\n[----------] Global test environment tear-down\n[==========] 5 tests from test suite ran. (32 ms total)\n[  PASSED  ] 5 tests.\n    VGRUN       ./vade/target/bin/bar/bar_test.exe\n[==========] Running tests from test suite.\n[----------] Global test environment set-up.\n[ RUN      ] bar_Test_Bar_\n[       OK ] bar_Test_Bar_ (0 ms)\n[----------] Global test environment tear-down\n[==========] 1 tests from test suite ran. (19 ms total)\n[  PASSED  ] 1 tests.\n==================================\nCode coverage (3 tests)\n==================================\nvade/target/pkg/bazcpp/bazcpp.gcda: 100.00% of 4\nvade/target/pkg/foo/foo.gcda: 100.00% of 2\nvade/target/pkg/bar/bar.gcda: 100.00% of 3\n```\n\nNote that an arbitrary (set of) package to build/test can be specified:\n```\n$ vade clean test P=pkg1 P+=pkg2 [ P+=.. ]\n\u003cbuilds of pkg1 \u0026 pkg2 dependencies only\u003e\n\u003ctests of pkg1 \u0026 pkg2 only\u003e\n```\nIf there are many subpackages in a given parent folder, then `P` can be set to the parent folder, to specify all subpackages.\n\nIf $PWD is located within one package, then `vade test` will only test this package (equivalent to specify `P=\u003cpackage`), without valgrind/gcov.\nCoupled to using tcc, this can amount to very fast TDD tight loops.\n\nPython unit tests are also supported, with some facilities to test C APIs, se `vade/src/pyut` for such an example.\n\nEnjoy !\n\n[WorkflowBadge]: https://github.com/nsauzede/ns_vade/actions/workflows/vade.yml/badge.svg\n[WorkflowUrl]: https://github.com/nsauzede/ns_vade/commits/main\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsauzede%2Fns_vade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnsauzede%2Fns_vade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsauzede%2Fns_vade/lists"}