-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/99 update documentation #640
Changes from all commits
edf619a
511fdb2
d1b14e4
5851acf
b2022c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: Apache Celix C++ Remote Services | ||
--- | ||
|
||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
# Apache Celix C++ Remote Services |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,11 +24,14 @@ Apache Celix aims to be support a broad range of UNIX platforms. | |
|
||
Currently, the [continuous integration build server] builds and tests Apache Celix for: | ||
|
||
* Ubuntu Bionic Beaver (20.04) | ||
* GCC | ||
* CLang | ||
* Ubuntu Focal Fossa (20.04) | ||
* GCC | ||
* CLang | ||
* Ubuntu Jammy Jellyfish (22.04) | ||
* GCC | ||
* CLang | ||
* OSX | ||
* CLang | ||
* CLang | ||
|
||
|
||
### Download the Apache Celix sources | ||
|
@@ -40,16 +43,74 @@ git clone --single-branch --branch master https://github.com/apache/celix.git | |
``` | ||
|
||
## Building and installing | ||
Apache Celix uses [CMake](https://cmake.org) as build system. CMake can generate (among others) makefiles. | ||
Apache Celix can be build using [Conan](https://conan.io) as package manager/build system or by directly using | ||
[CMake](https://cmake.org). | ||
|
||
### Building and installing with preinstalled libraries | ||
### Building Apache Celix using Conan | ||
The following packages (libraries + headers) should be installed on your system: | ||
|
||
* Development Environment | ||
* build-essentials (gcc/g++ or clang/clang++) | ||
* java or zip (for packaging bundles) | ||
* make (3.14 or higher) | ||
* git | ||
* cmake (3.19 or higher) | ||
* Conan (2 or higher) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We still support Conan 1 in our CI. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed. I think it is good to promote conan 2. |
||
|
||
For Ubuntu 22.04, use the following commands: | ||
```bash | ||
sudo apt-get install -yq --no-install-recommends \ | ||
build-essential \ | ||
git \ | ||
default-jdk \ | ||
python3 \ | ||
python3-pip \ | ||
ninja-build | ||
|
||
#The cmake version for Ubuntu 20 is older than 3.14, | ||
#use snap to install the latest cmake version | ||
snap install cmake | ||
|
||
#Install conan | ||
pip3 install -U conan | ||
``` | ||
|
||
Configure conan default profile using automatic detection of the system | ||
```bash | ||
conan profile detect | ||
``` | ||
|
||
Create Apache Celix package - and build the dependencies - in the Conan cache: | ||
```bash | ||
cd <celix_source_dir> | ||
conan create . --build missing -o build_all=True | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When trying this on a brand-new machine (no jave pre-installed), I encountered the following error:
It turns out that bundle packaging using zip (instead of jar) does not work. |
||
#Optionally build with CMake->Ninja, instead of CMake->Make. Note this includes building dependencies with Ninja. | ||
conan create . --build missing -o build_all=True -c tools.cmake.cmaketoolchain:generator=Ninja | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One user requires a minimal build consists of Conan allows users to specify only what they need, and guarantees to provide a minimal build satisfying the requirements. It will be beneficial to mention this. |
||
|
||
Note installing Apache Celix is not required when using Conan, because Conan will install the Apache Celix package | ||
in the local Conan cache. | ||
|
||
It is also possible to only build a selection of the Apache Celix bundles and/or libs. This can be done by providing | ||
build options for the required parts instead of the `build_all=True` option. For example to only build the Apache Celix | ||
framework library and the Apache Celix utils library use the following command: | ||
```bash | ||
conan create . --build missing -o build_framework=True -o build_utils=True | ||
``` | ||
|
||
To see a complete overview of the available build options use the following command: | ||
```bash | ||
conan inspect . | grep build_ | ||
``` | ||
|
||
### Building Apache Celix directly using CMake | ||
The following packages (libraries + headers) should be installed on your system: | ||
|
||
* Development Environment | ||
* build-essentials (gcc/g++ or clang/clang++) | ||
* java or zip (for packaging bundles) | ||
* make (3.19 or higher) | ||
* git | ||
* Apache Celix Dependencies | ||
* libzip | ||
* uuid | ||
|
@@ -62,7 +123,7 @@ The following packages (libraries + headers) should be installed on your system: | |
* libczmq (for PubSubAdmin ZMQ) | ||
|
||
|
||
For Ubuntu 20.04, use the following commands: | ||
For Ubuntu 22.04, use the following commands: | ||
```bash | ||
#### get dependencies | ||
sudo apt-get install -yq --no-install-recommends \ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,24 +19,45 @@ See the License for the specific language governing permissions and | |
limitations under the License. | ||
--> | ||
|
||
# Apache Celix - Subprojects | ||
# Apache Celix - Libraries and Bundles | ||
|
||
Apache Celix is organized into several subprojects. The following subproject are available: | ||
The Apache Celix project is organized into several libraries, bundles, group of bundles and examples. | ||
|
||
## Core Libraries | ||
The core of Apache Celix is realized in the following libraries: | ||
|
||
* [Framework](../libs/framework) - The Apache Celix framework, an implementation of OSGi adapted to C and C++11. | ||
* [Utils](../libs/utils/README.md) - The Celix utils library, containing a wide range of utils functions (string, file, C hashmap, C arraylist, etc) | ||
* [Examples](../examples) - A Selection of examples showing how the framework can be used. | ||
* [Log Service](../bundles/logging/README.md) - A Log Service logging abstraction for Apache Celix. | ||
* [Syslog Writer](../bundles/logging/log_writers/syslog_writer) - A syslog writer for use in combination with the Log Service. | ||
* [Shell](../bundles/shell/README.md) - A OSGi C and C++11 shell implementation. | ||
* [Pubsub](../bundles/pubsub/README.md) - An implementation for a publish-subscribe remote message communication system. | ||
* [HTTP Admin](../bundles/http_admin/README.md) - An implementation for the OSGi HTTP whiteboard adapted to C and based on civetweb. | ||
* [Remote Services](../bundles/cxx_remote_services) - A C++17 adaption and implementation of the OSGi Remote Service Admin specification. | ||
* [Components Ready Check](../bundles/components_ready_check/README.md) - A bundle which checks if all components are ready. | ||
* [Utils](../libs/utils/README.md) - The Celix utils library, containing a wide range of general utils and | ||
OSGi supporting types (properties, version, filter, string utils, file utils, etc). | ||
|
||
Standalone libraries: | ||
## Standalone Libraries | ||
Apache Celix also provides several standalone libraries which can be used without the framework: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It will be helpful to mention that building them with Conan involves only turning on one option. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will add this |
||
|
||
* [Etcd library](../libs/etcdlib/README.md) - A C library that interfaces with ETCD. | ||
* [ETCD library](../libs/etcdlib/README.md) - A C library that interfaces with ETCD. | ||
* [Promises library](../libs/promises/README.md) - A C++17 header only adaption and implementation of the OSGi Promise specification. | ||
* [Push Streams Library](../libs/pushstreams/README.md) - A C++17 header adaption and only implementation of the OSGi Push Stream specification. | ||
* [Push Streams Library](../libs/pushstreams/README.md) - A C++17 header adaption and only implementation of the OSGi Push Stream specification. | ||
* [Dynamic Function Interfacy Library](../libs/dfi/README.md) - A C library, build on top of libffi, to dynamical create C function proxies based on descriptor files. | ||
|
||
When using Conan as build system, these libraries can be build standalone using the following commands: | ||
|
||
* ETCD library: `conan create . -b missing -o build_celix_etcdlib=True` | ||
* Promises library: `conan create . -b missing -o build_promises=True` | ||
* Push Streams Library: `conan create . -b missing -o build_pushstreams=True` | ||
* Dynamic Function Interfacy Library: `conan create . -b missing -o build_celix_dfi=True` | ||
|
||
## Bundles or Groups of Bundles | ||
Modularization is an important aspect of OSGi. Apache Celix provides several bundles or groups of bundles which extend | ||
the Apache Celix functionality. Most of these bundles are based on the OSGi specification and are adapted to C or C++. | ||
|
||
* [HTTP Admin](../bundles/http_admin/README.md) - An implementation for the OSGi HTTP whiteboard adapted to C and based on civetweb. | ||
* [Log Service](../bundles/logging/README.md) - A Log Service logging abstraction for Apache Celix. | ||
* [Syslog Writer](../bundles/logging/log_writers/syslog_writer) - A syslog writer for use in combination with the Log Service. | ||
* [Shell](../bundles/shell/README.md) - A OSGi C and C++11 shell implementation, which can be extended with shell command services. | ||
* [Pubsub](../bundles/pubsub/README.md) - An implementation for a publish-subscribe remote message communication system. | ||
* [Remote Services](../bundles/remote_services) - A C adaption and implementation of the OSGi Remote Service Admin specification. | ||
* [C++ Remote Services](../bundles/cxx_remote_services/README.md) - A C++17 adaption and implementation of the OSGi Remote Service Admin specification. Requires manually or code-generated import/export factories to work. | ||
* [Components Ready Check](../bundles/components_ready_check/README.md) - A bundle which checks if all components are ready. | ||
|
||
## Examples | ||
The Apache Celix provides several [examples](../examples/celix-examples) showing how the framework and bundles can be used. These | ||
examples are configured in such a way that they can also be used together with an installed Apache Celix. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: Apache Celix Dynamic Function Interface | ||
--- | ||
|
||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
# Apache Celix Dynamic Function Interface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch.