ocadaruma / duckdb-custom-ext

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An example of custom duckdb extension which runs on duckdb-wasm.

How to run

  • Prerequisites
    • emsdk
    • rust toolchain
      • wasm32-unknown-emscripten
    • cmake
    • ccache

Build:

# NOTE: You should activate emsdk before run

% cd /path/to/duckdb-custom-ext
% git submodule update --init --recursive
% cargo build --release --target wasm32-unknown-emscripten
% make -C duckdb-wasm \
  DUCKDB_SKIP_BUILD_EH=1 \
  DUCKDB_SKIP_BUILD_COI=1 \
  CUSTOM_EXTENSION_DIRS=$PWD \
  wasm wasmpack shell docs app_start

Go localhost:9002 and open console:

image

You should see hello from extension! on the console!

About

License:Apache License 2.0


Languages

Language:CMake 59.4%Language:Rust 40.6%