Skip to content

Commit 9176499

Browse files
cmnrdpetervdonovanCopybara Bot
authored
Release v0.5.0 (#13)
# Release v0.5.0 ## Features 🚀 - Python 3.14 support (Python SDK) - Installable pre-compiled artifacts (C++ SDK) ## Improvements 🛠️ - Fully implemented compilation firewall using [pImpl](https://en.cppreference.com/w/cpp/language/pimpl.html) to improve API stability and decouple user code from internal changes (C++ SDK). - Replaced our build tool [earthly](https://github.com/earthly/earthly) with [Docker bake](https://docs.docker.com/build/bake/) - Added build options for disabling the diagram and telemetry features to allow a minimal build (C++ SDK) ## Documentation 📖 - Integrated C++ docs with main documentation website at https://docs.xronos.com - Updated and improved C++ and Python API docs - Show current SDK version GitOrigin-RevId: 4a0a28fac7401b2f4eb6062e9ff4861789606a2f --------- Co-authored-by: Christian Menard <christian@xronos.com> Co-authored-by: Peter Donovan <33707478+petervdonovan@users.noreply.github.com> Co-authored-by: Copybara Bot <copybara@xronos.com>
1 parent c264735 commit 9176499

File tree

697 files changed

+19875
-15284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

697 files changed

+19875
-15284
lines changed

.clang-tidy

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
Checks: '
22
clang-diagnostic-*,
3-
boost-*,
43
Google-*,
54
clang-analyzer-*,
65
modernize-*,
@@ -10,13 +9,21 @@ Checks: '
109
cppcoreguidelines-*,
1110
llvm-*,
1211
cert-*,
13-
-clang-analyzer-core.CallAndMessage,
14-
-readability-redundant-member-init'
15-
WarningsAsErrors: true
16-
HeaderFilterRegex: ''
12+
misc-include-cleaner,
13+
-readability-redundant-member-init,
14+
-portability-template-virtual-member-function'
15+
WarningsAsErrors: '*'
16+
HeaderFilterRegex: 'xronos/.*\.hh'
1717
FormatStyle: none
18+
UseColor: true
1819
CheckOptions:
1920
- key: readability-identifier-length.MinimumParameterNameLength
2021
value: 2
22+
- key: readability-identifier-length.IgnoredVariableNames
23+
value: ^(to|it|_)$
24+
- key: readability-identifier-length.IgnoredParameterNames
25+
value: ^(to|it|_)$
2126
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
2227
value: true
28+
- key: misc-include-cleaner.IgnoreHeaders
29+
value: bits/chrono.h;pybind11/detail/.*

Dockerfile

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
FROM ubuntu:22.04 AS base
2+
WORKDIR /xronos
3+
4+
ENV DEBIAN_FRONTEND=noninteractive
5+
ENV DISPLAY=localhost:0.0
6+
7+
ARG clang_tools_version=20
8+
9+
RUN apt-get update -qq
10+
RUN apt-get install -y -q --no-install-recommends apt-utils
11+
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
12+
13+
# Some base packages required for adding ppas
14+
RUN apt-get install -y -q --no-install-recommends \
15+
ca-certificates \
16+
curl \
17+
gnupg \
18+
gpg \
19+
software-properties-common \
20+
wget
21+
22+
# add kitware ppa for cmake
23+
RUN wget -qO- https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor - > /usr/share/keyrings/kitware-archive-keyring.gpg
24+
RUN echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/kitware.list
25+
26+
# add ppa for clang tools
27+
RUN wget -qO- https://apt.llvm.org/llvm.sh | bash -s -- ${clang_tools_version}
28+
29+
# add ppa for Python
30+
RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 6A755776
31+
RUN gpg --export 6A755776 | gpg --dearmor > /etc/apt/trusted.gpg.d/deadsnakes-ppa.gpg
32+
RUN echo "deb [signed-by=/etc/apt/trusted.gpg.d/deadsnakes-ppa.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/deadsnakes-ppa.list
33+
34+
# install all packages
35+
RUN apt-get update -qq && apt-get install -y -q --no-install-recommends \
36+
build-essential \
37+
cmake=3.28.6-0kitware1ubuntu22.04.1 \
38+
cmake-data=3.28.6-0kitware1ubuntu22.04.1 \
39+
clang-format-${clang_tools_version} \
40+
clang-tidy-${clang_tools_version} \
41+
dpkg-dev \
42+
file \
43+
git \
44+
global \
45+
gnupg \
46+
graphviz \
47+
llvm-${clang_tools_version}-dev \
48+
libclang-${clang_tools_version}-dev \
49+
libgl1 \
50+
python3.10-dev python3.10-venv \
51+
python3.11-dev python3.11-venv \
52+
python3.12-dev python3.12-venv \
53+
python3.13-dev python3.13-venv python3.13-nogil \
54+
python3.14-dev python3.14-venv python3.14-nogil \
55+
python3-pygments \
56+
zlib1g-dev
57+
58+
# This is a workaround for a gcc bug. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118700
59+
RUN cp /usr/include/python3.13t/pyconfig.h ./
60+
RUN rm -rf /usr/include/python3.13t
61+
RUN cp -r /usr/include/python3.13 /usr/include/python3.13t
62+
RUN rm /usr/include/python3.13t/pyconfig.h
63+
RUN mv ./pyconfig.h /usr/include/python3.13t/pyconfig.h
64+
# Same for Python 3.14
65+
RUN cp /usr/include/python3.14t/pyconfig.h ./
66+
RUN rm -rf /usr/include/python3.14t
67+
RUN cp -r /usr/include/python3.14 /usr/include/python3.14t
68+
RUN rm /usr/include/python3.14t/pyconfig.h
69+
RUN mv ./pyconfig.h /usr/include/python3.14t/pyconfig.h
70+
71+
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${clang_tools_version} 100
72+
RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${clang_tools_version} 100
73+
RUN update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-${clang_tools_version} 100
74+
RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${clang_tools_version} 100
75+
76+
77+
FROM base AS py-venv
78+
ARG python_version
79+
COPY dev-requirements.txt ./
80+
RUN python$python_version -m venv /venv
81+
RUN . /venv/bin/activate && pip install -r dev-requirements.txt
82+
# Run pyright once to install its node dependencies
83+
RUN . /venv/bin/activate && pyright --version
84+
85+
86+
FROM scratch AS configs
87+
COPY .clang-format .clang-tidy dev-requirements.txt pip-build-constraints.txt /
88+
89+
FROM hashicorp/terraform:1.11 AS check-format
90+
WORKDIR /xronos
91+
# Need to rename the file because terraform fmt errors out for .hcl (without tftest)
92+
COPY docker-bake.hcl docker-bake.tftest.hcl
93+
RUN terraform fmt --check docker-bake.tftest.hcl

Earthfile

Lines changed: 0 additions & 37 deletions
This file was deleted.

README.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Xronos
22

3+
[![GitHub Release](https://img.shields.io/github/v/release/xronos-inc/xronos?logo=GitHub)](https://github.com/xronos-inc/xronos/releases/latest)
4+
[![PyPI - Version](https://img.shields.io/pypi/v/xronos?logo=Python&logoColor=silver)](https://pypi.org/project/xronos/)
5+
[![GitHub License](https://img.shields.io/github/license/xronos-inc/xronos)](https://github.com/xronos-inc/xronos/blob/main/LICENSE)
6+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/xronos?logo=Python&logoColor=silver)](https://pypi.org/project/xronos/)
7+
[![Static Badge](https://img.shields.io/badge/docs-blue?logo=Read%20the%20Docs&logoColor=white)](https://docs.xronos.com/)
8+
39
**Xronos** is a lightweight framework for building deterministic, component-based robotics applications in Python or C++.
410
It supports real-time telemetry, system visualization, and modular design with a focus on clarity, scalability, and correctness.
511

@@ -14,43 +20,38 @@ It supports real-time telemetry, system visualization, and modular design with a
1420

1521
## Usage
1622

17-
For Python users, the [xronos PyPi package](https://pypi.org/project/xronos/) is published as a standalone Python
18-
package. Building from source is not required.
19-
20-
- **Python users**: Get started at [docs.xronos.com](https://docs.xronos.com)
21-
- **C++ users**: See [docs.xronos.com/cpp](https://docs.xronos.com/cpp)
22-
- **VS Code users**: The [Xronos VS Code Extension](https://marketplace.visualstudio.com/items?itemName=xronos.xronos) is optional and enables diagrams of your programs
23+
- **Python users**: See [docs.xronos.com/python\_sdk/getting\_started.html](https://docs.xronos.com/python_sdk/getting_started.html)
24+
- **C++ users**: See [docs.xronos.com/cpp\_sdk/getting\_started.html](https://docs.xronos.com/cpp_sdk/getting_started.html)
25+
- **VS Code users**: The optional [Xronos VS Code Extension](https://marketplace.visualstudio.com/items?itemName=xronos.xronos) renders diagrams of your programs
2326

2427
## Repository Structure
2528

2629
```bash
2730
.
28-
├── base-images/: # Earthly base images
29-
├── cpp-sdk/: # C++ SDK
31+
├── cpp-sdk/ # C++ SDK
32+
├── docker-bake.hcl # build definitions
3033
├── docs/ # source for https://docs.xronos.com
31-
├── examples/: # python SDK examples
32-
├── lib/ # library components
34+
├── examples/ # python SDK examples
35+
├── lib/ # core Xronos libraries
3336
├── third-party/ # third-party libraries
34-
├── xronos/ # source for the xronos framework
35-
├── Earthfile # earthly build definitions
37+
├── xronos/ # Python SDK
3638
└── README.md # project overview (this file)
3739
```
3840

3941
## Building from Source
4042

41-
To build locally:
4243

43-
1. [Install Docker](https://docker.com)
44-
2. [Install Earthly](https://earthly.dev/get-earthly)
45-
3. Run:
44+
We use [docker bake](https://docs.docker.com/build/bake/) as our top-level build
45+
tool. To build locally, install [docker](https://docker.com) and the [buildx
46+
extension](https://github.com/docker/buildx) (if not included in your docker
47+
installation). Then run:
4648

47-
```bash
48-
earthly +build
49-
```
49+
```bash
50+
docker buildx bake build
51+
```
5052

5153
## Links
5254

53-
- Website: [https://xronos.com](https://xronos.com)
54-
- Python Package: [https://pypi.org/project/xronos](https://pypi.org/project/xronos/)
55-
- Documentation: [https://docs.xronos.com](https://docs.xronos.com)
56-
- C++ Docs: [https://docs.xronos.com/cpp](https://docs.xronos.com/cpp)
55+
- Documentation: [https://docs.xronos.com](https://docs.xronos.com)
56+
- Company website: [https://xronos.com](https://xronos.com)
57+
- Python package: [https://pypi.org/project/xronos](https://pypi.org/project/xronos/)

base-images/Earthfile

Lines changed: 0 additions & 80 deletions
This file was deleted.

cpp-sdk/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
doxygen/
2+
pkgs/

0 commit comments

Comments
 (0)