Giter VIP home page Giter VIP logo

bzd's Introduction

bzd Framework

Build Status CI

Access the rendered version of this documentation.

Fullstack, lightweight and flexible framework for IoT applications. This mono-repository enables the following technologies:

C++20 Python3.11 Node (v20+) Vue Bazel Eagle

Overview

This framework is built to run on all sort of embedded platforms, from bare metals 8-bit microcontrollers to high performance compute units. It is made to remove any dependencies from STL, but provide a similar set of components and utilities to develop applications in an efficient and safe manner.

It features the following:

  • No dynamic allocations. All storage is declared either at compile time or on the stack.
  • The core library is self contained, no reliance on third-party, only on the freestanding STL.
  • Flexible error handling model.
  • Based on C++ coroutines.
  • Compile-time string formatting tool.
  • Lightweight.
  • Useful set of containers.

Platforms

The following target platforms are currently supported:

Name Compiler Version Executors Debug
linux_x86_64_clang* clang 17.0.2 host*
linux_x86_64_gcc gcc 13.1.0 host*
esp32_xtensa_lx6_gcc gcc 12.2.0 sim*, uart x

* Default.

When debug is supported by the platform, one can run a target with --config=debug option and a debug environment will be made available.

Build

Locally

To build everything, just run:

bazel test //...

This will build locally, it will fetch all tools needed to build on your machine.

Remote

Remote execution is also supported and is enabled by first deploying on a server the predefined Buildbarn configuration:

./tools/buildbarn/run.sh

Then to build bazel targets simply run bazel appended with --config=remote.

For debugging purposes, toolchains can be run locally in a docker sandbox which is very similar to what runs on remote execution. To enable this configuration, run bazel with --config=docker.

Code Quality

All supported languages come with their set of code quality related tools. To run all static sanity checks at once, code formatters and documentation generators, run the following command:

bazel run //:sanitizer

To run all tests, run the following command:

./quality_gate.sh

This is a non-exhaustive list of languages and their supported tools. In addition to that formatter and linters for YAML, json and markdown are also available.

Language Formatters Code Analyzers Code Coverage Test Framework Documentation
C++ clang-format clang-tidy, asan, lsan, tsan, ubsan Yes Yes doxygen-based
Python yapf mypy Yes Yes
Node prettier eslint Yes Yes
Skylark buildifier buildifier stardoc

Naming Convention

The code in this repository follows several principle regarding naming convention. The following rules are applied cross languages.

  • Files and directories are named lower case snake_case using only the characters matching the regexpr: [a-z0-9_/.]. This is enforced by tools/sanitizer/actions/structure.
  • Variables, constants, functions, concepts, namespaces are named in camelCase.
  • All types are named in PascalCase.
  • Non-public members (variables, functions...) are appended with a _ character.
  • All namings try to avoid abbreviations.

Memory Footprint

All classes offered by this library have the same objective to have a fixed memory size. Their footprint or maximum size is determined at compile time, ensuring no memory allocation at runtime, making this library ideal for any safety-critical application.

TODO

  • Fix this test: //cc/bzd/core/async/tests:multithread (it hangs from time to time with clang prod).

bzd's People

Contributors

blaizard avatar foobar2016 avatar

Stargazers

mindthink avatar Tuan Duc Tran avatar Javier Antoniucci avatar Kin Numaru avatar Thibault avatar Trevor Hickey avatar  avatar Sylwester Cyba avatar copter.js avatar

Watchers

 avatar  avatar

bzd's Issues

git clone --recursive fails

I'm trying to get a ESP32 Bazel toolchain going and I have looked into your project to figure out how to do it.

git clone --recursive [email protected]:blaizard/cpp-async.git
Cloning into 'cpp-async'...
remote: Enumerating objects: 1047, done.
remote: Counting objects: 100% (1047/1047), done.
remote: Compressing objects: 100% (763/763), done.
remote: Total 15027 (delta 506), reused 769 (delta 277), pack-reused 13980
Receiving objects: 100% (15027/15027), 3.70 MiB | 31.88 MiB/s, done.
Resolving deltas: 100% (9218/9218), done.
Submodule 'apps/family' ([email protected]:blaizard/family.git) registered for path 'apps/family'
Cloning into '/home/dmitry/Dev/third_party/cpp-async/apps/family'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Seems like this uses the repo that either does not exist or is not public. Do I need it? Should it be removed?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.