Skip to content

Commit

Permalink
Merge commit 'cbac44c5e9151730024f3304556b3b30f026fa7a' into feature/…
Browse files Browse the repository at this point in the history
…opfs_support
  • Loading branch information
e1arikawa committed Sep 22, 2024
2 parents 0977660 + cbac44c commit 383ff1b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 20 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,10 @@ jobs:
name: duckdb-wasm-packages-loadable
path: duckdb-wasm-packages.zip

- name: Measure NPM stats
run: |
./scripts/npm_measure_lib.sh || true
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
Expand Down
48 changes: 28 additions & 20 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -236,31 +236,39 @@ add_library(
${CMAKE_SOURCE_DIR}/src/webdb.cc
${CMAKE_SOURCE_DIR}/src/webdb_api.cc)

add_library(
duckdb_web_fts
${CMAKE_SOURCE_DIR}/src/extensions/fts_extension.cc)
if (DUCKDB_WASM_LOADABLE_EXTENSIONS)
set(EXTENSION_CACHE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../.ccache/extension")
set(JSON_EXTENSION_CACHE_FILE "${EXTENSION_CACHE_DIR}/json")
set(DUCKDB_WEB_JSON "")

add_library(
duckdb_web_parquet
${CMAKE_SOURCE_DIR}/src/extensions/parquet_extension.cc)
target_link_libraries(duckdb_web duckdb arrow rapidjson ${THREAD_LIBS})
else()
add_library(
duckdb_web_fts
${CMAKE_SOURCE_DIR}/src/extensions/fts_extension.cc)

add_library(
duckdb_web_json
${CMAKE_SOURCE_DIR}/src/extensions/json_extension.cc)
add_library(
duckdb_web_parquet
${CMAKE_SOURCE_DIR}/src/extensions/parquet_extension.cc)

set(EXTENSION_CACHE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../.ccache/extension")
set(JSON_EXTENSION_CACHE_FILE "${EXTENSION_CACHE_DIR}/json")
add_library(
duckdb_web_json
${CMAKE_SOURCE_DIR}/src/extensions/json_extension.cc)

set(DUCKDB_WEB_JSON "")
if(EXISTS "${JSON_EXTENSION_CACHE_FILE}")
set(DUCKDB_WEB_JSON "duckdb_web_json")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDUCKDB_JSON_EXTENSION")
endif()
set(EXTENSION_CACHE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../.ccache/extension")
set(JSON_EXTENSION_CACHE_FILE "${EXTENSION_CACHE_DIR}/json")

set(DUCKDB_WEB_JSON "")
if(EXISTS "${JSON_EXTENSION_CACHE_FILE}")
set(DUCKDB_WEB_JSON "duckdb_web_json")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDUCKDB_JSON_EXTENSION")
endif()

target_link_libraries(duckdb_web duckdb duckdb_web_fts duckdb_web_parquet ${DUCKDB_WEB_JSON} arrow rapidjson ${THREAD_LIBS})
target_link_libraries(duckdb_web_fts duckdb duckdb_fts)
target_link_libraries(duckdb_web_parquet duckdb duckdb_parquet)
target_link_libraries(duckdb_web_json duckdb duckdb_json)
target_link_libraries(duckdb_web duckdb duckdb_web_fts duckdb_web_parquet ${DUCKDB_WEB_JSON} arrow rapidjson ${THREAD_LIBS})
target_link_libraries(duckdb_web_fts duckdb duckdb_fts)
target_link_libraries(duckdb_web_parquet duckdb duckdb_parquet)
target_link_libraries(duckdb_web_json duckdb duckdb_json)
endif()

# ---------------------------------------------------------------------------
# Emscripten
Expand Down

0 comments on commit 383ff1b

Please sign in to comment.