Skip to content

Commit

Permalink
Merge pull request #2 from carlopi/wasm_c_capi
Browse files Browse the repository at this point in the history
Add support for Wasm targets
  • Loading branch information
samansmink authored Nov 18, 2024
2 parents 6764e09 + a6f1499 commit 61e7420
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/MainDistributionPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ jobs:
ci_tools_version: main
extension_name: capi_quack
extra_toolchains: python3
exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads'
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 2.8)
option(DUCKDB_WASM_EXTENSIONS "Whether compiling for Wasm target" OFF)

###
# Configuration
Expand Down Expand Up @@ -26,7 +27,12 @@ set(EXTENSION_SOURCES
src/add_numbers.c
src/capi_quack.c
)
add_library(${EXTENSION_NAME} SHARED ${EXTENSION_SOURCES})

if (DUCKDB_WASM_EXTENSION)
add_library(${EXTENSION_NAME} STATIC ${EXTENSION_SOURCES})
else()
add_library(${EXTENSION_NAME} SHARED ${EXTENSION_SOURCES})
endif()

# Hide symbols
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
Expand Down

0 comments on commit 61e7420

Please sign in to comment.