An OSS Bazel ruleset to support building Apache Celix bundles and applications.
Celix is an OSGi-inspired framework for C and C++.
A Celix bundle is a zip archive containing a META-INF/MANIFEST.MF, one or more shared libraries, and optional resources.
This ruleset lets you produce valid Celix bundles from a fully hermetic Bazel build without invoking Celix’s CMake helpers.
v0.3.0 (in progress): runnable celix_container, C++ framework-resolution fix, deterministic distributable tarball.
Not yet on the Bazel Central Registry (BCR) (BCR publication is planned for v1.0).
Use local_path_override or git_override.
See the roadmap for full status and milestone details.
Add the ruleset to your MODULE.bazel (local checkout or git pin):
bazel_dep(name = "rules_celix", version = "0.2.0")
local_path_override(
module_name = "rules_celix",
path = "../rules_celix", # path to this repository
)
# or, for a git pin:
# git_override(
# module_name = "rules_celix",
# remote = "https://github.com/<you>/rules_celix.git",
# commit = "<commit-sha>",
# )The ruleset fetches and builds its own Apache Celix 2.4.0 (celix_deps in MODULE.bazel), so the convenience macros and the runnable celix_container need no consumer-supplied Celix.
Use the explicit activator path of celix_bundle, or supply your own @celix, only when you need a different framework or build it yourself (see rules_foreign_cc).
Build your first bundle:
# BUILD.bazel
load("@rules_celix//celix:defs.bzl", "celix_c_bundle")
celix_c_bundle(
name = "hello_bundle",
symbolic_name = "com.example.hello",
version = "1.0.0",
srcs = ["hello_activator.c"],
)./bazelw build //:hello_bundle
# → bazel-bin/hello_bundle.zip (valid Celix bundle)Full walkthrough: docs/using/quickstart.md.
- For consumers: docs/using/. Quickstart, bundles, containers, and API reference (quickstart, bundles, containers, API reference).
- For contributors: docs/developing/. Setup, roadmap, implementation notes, testing, and releasing (setup, roadmap, implementation notes, testing, releasing).
- Start at the docs index.
Issues and pull requests are welcome.
Please run ./bazelw run @buildifier_prebuilt//:buildifier -- -r . and the test suite before submitting.
See CONTRIBUTING.md for details.
Apache License 2.0, same as Apache Celix.
- Apache Celix
- rules_pkg
- rules_foreign_cc (useful for building Celix itself from source)