Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .github/workflows/build_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ jobs:
version: '16'
platform: 'x64'

- name: 'Setup Clang for FFI metadata'
uses: KyleMayes/install-llvm-action@v2
with:
version: '22.1.0'
force-url: 'https://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.0/LLVM-22.1.0-Linux-X64.tar.xz'
env: false

- name: 'Setup CMake'
uses: jwlawson/actions-setup-cmake@v2
with:
Expand All @@ -39,11 +46,13 @@ jobs:
run: |
cmake --preset linux-gcc-release \
-DCMAKE_C_COMPILER=gcc-16 \
-DCMAKE_CXX_COMPILER=g++-16
-DCMAKE_CXX_COMPILER=g++-16 \
-DCPP_CORE_AST_CLANGXX="${LLVM_PATH}/bin/clang++"

- name: 'Build'
run: |
cmake --build --preset linux-gcc-release --target cpp_bindings_linux
cmake --build --preset linux-gcc-release \
--target cpp_bindings_linux cpp_core_ast_slim_json

- name: 'Set PACKAGE_VERSION from env.bat'
id: version
Expand All @@ -70,7 +79,9 @@ jobs:
with:
if-no-files-found: error
name: libcpp_bindings_linux
path: build/libcpp_bindings_linux.so
path: |
build/libcpp_bindings_linux.so
build/ast/cpp_core_ffi_api.json

- name: 'Create GitHub Release'
if: github.ref_type == 'tag' && steps.check-tag.outputs.IS_VALID_PACKAGE_VERSION == 'true'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish_jsr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ jobs:
- name: 'Prepare files for JSR'
run: |
mkdir -p ./jsr/bin
mkdir -p ./jsr/ffi
cp ./artifacts/libcpp_bindings_linux.so ./jsr/bin/x86_64.so
cp ./artifacts/ast/cpp_core_ffi_api.json ./jsr/ffi/cpp_core_ffi_api.json

./jsr/scripts/binary_to_json.sh \
./artifacts/libcpp_bindings_linux.so \
Expand All @@ -71,4 +73,3 @@ jobs:
working-directory: jsr
run: |
deno publish --allow-dirty --dry-run

1 change: 1 addition & 0 deletions jsr/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bin/
ffi/
!src/bin/
5 changes: 5 additions & 0 deletions jsr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

Binaries are provided as a [package on JSR](https://jsr.io/@serial/cpp-bindings-linux). They are serialized as a base64 string inside the JSON file.

The package also includes the generated cpp-core FFI API metadata at
`ffi/cpp_core_ffi_api.json`. It describes the exported C symbols, parameter and
return types, callbacks, default values, and API documentation used by downstream
FFI adapter generators.

This package is primarily intended as a dependency for [`@serial/serial`](https://jsr.io/@serial/serial). However, it can also be used independently.


Expand Down
8 changes: 4 additions & 4 deletions jsr/jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"LICENSE",
"jsr.json",
"src/**",
"bin/**"
"bin/**",
"ffi/**"
],
"exclude": [
"!bin/"
"!bin/",
"!ffi/"
]
}
}


Loading