From 24dec62264a0fac5af006ce808a5b701ba3f9a66 Mon Sep 17 00:00:00 2001 From: Oleg Nenashev Date: Sat, 25 Oct 2025 21:35:30 +0200 Subject: [PATCH 1/2] Update the architecture doc Updated README to reflect naming changes for the Testcontainers libraries and adjusted stage descriptions. --- docs/architecture/README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/architecture/README.md b/docs/architecture/README.md index 1476f99..abb9e01 100644 --- a/docs/architecture/README.md +++ b/docs/architecture/README.md @@ -7,21 +7,26 @@ ![Testcontainers Native Build Process](./images/build-process.png) -### Stage 1. Testcontainers for C shared library +### Stage 1. Testcontainers for C Bridge library -The core `testcontainers-c` shared library is built with [Cgo](https://pkg.go.dev/cmd/cgo). +The core `testcontainers-bridge` shared library is built with [Cgo](https://pkg.go.dev/cmd/cgo). For that the `-buildmode=c-shared` is used in the Golang builder, and it also receives a customized header so that the types can be mapped between C and Golang. -For that, we also have to flatten the structure and to switch the reference-based build process to fixed Objects stored in the Golang namespace, and C API +We also have to flatten the structure and to switch the reference-based build process to fixed Objects stored in the Golang namespace, and C API using unique object IDs. -### Stage 2. Language Bindings +### Stage 2. Testcontainers for C shared library + +As _Cgo_ cannot produde fancy headers and structure, we have a manually created header file that wraps core functionality of `tescontainers-bridge`. +This provides a static library and header files that can be used natively in C/C++ development, or by language bindings. + +### Stage 3. Language Bindings Then, we build custom binding libraries, by using Testcontainers for C as a static library that is bundled into the language specific libs. This stage depends on the language and common practices there. -### Stage 3. Executable Code +### Stage 4. Executable Code Well, you build it. From the previous stages, From bfbe8a7830edf270c3dd49ff5dd68f8d85487d6a Mon Sep 17 00:00:00 2001 From: Oleg Nenashev Date: Sun, 26 Oct 2025 06:44:34 +0100 Subject: [PATCH 2/2] Update docs/architecture/README.md --- docs/architecture/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/architecture/README.md b/docs/architecture/README.md index abb9e01..66cd711 100644 --- a/docs/architecture/README.md +++ b/docs/architecture/README.md @@ -17,7 +17,7 @@ using unique object IDs. ### Stage 2. Testcontainers for C shared library -As _Cgo_ cannot produde fancy headers and structure, we have a manually created header file that wraps core functionality of `tescontainers-bridge`. +As _Cgo_ cannot produce fancy headers and structure, we have a manually created header file that wraps core functionality of `tescontainers-bridge`. This provides a static library and header files that can be used natively in C/C++ development, or by language bindings. ### Stage 3. Language Bindings