Skip to content

Commit ce7160e

Browse files
Aix v0.1.0
0 parents  commit ce7160e

85 files changed

Lines changed: 7751 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
duckdb/.clang-format

.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
duckdb/.clang-tidy

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
duckdb/.editorconfig
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# This workflow calls the main distribution pipeline from DuckDB to build, test and (optionally) release the extension
3+
#
4+
name: Main Extension Distribution Pipeline
5+
on:
6+
push:
7+
pull_request:
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' && github.sha || '' }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
duckdb-stable-build:
16+
name: Build extension binaries
17+
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v1.4-andium
18+
with:
19+
duckdb_version: v1.4.4
20+
ci_tools_version: v1.4-andium
21+
extension_name: aixchess
22+
extra_toolchains: rust
23+
exclude_archs: 'windows_amd64_mingw;wasm_mvp;wasm_eh;wasm_threads'
24+
opt_in_archs: windows_arm64

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
*.parquet
2+
*.duckdb
3+
.vscode/
4+
build
5+
.idea
6+
cmake-build-debug
7+
duckdb_unittest_tempdir/
8+
.DS_Store
9+
testext
10+
test/python/__pycache__/
11+
.Rhistory
12+
compile_commands.json
13+
Cargo.lock
14+
target/

.gitmodules

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[submodule "duckdb"]
2+
path = duckdb
3+
url = https://github.com/duckdb/duckdb
4+
branch = main
5+
[submodule "extension-ci-tools"]
6+
path = extension-ci-tools
7+
url = https://github.com/duckdb/extension-ci-tools
8+
branch = main

CMakeLists.txt

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
cmake_minimum_required(VERSION 3.5)
2+
3+
# Set extension name here
4+
set(TARGET_NAME aixchess)
5+
6+
set(EXTENSION_NAME ${TARGET_NAME}_extension)
7+
set(LOADABLE_EXTENSION_NAME ${TARGET_NAME}_loadable_extension)
8+
9+
if(WIN32)
10+
set(RUST_LIB_FILENAME aixrs.lib)
11+
else()
12+
set(RUST_LIB_FILENAME libaixrs.a)
13+
endif()
14+
15+
if (DEFINED Rust_CARGO_TARGET)
16+
set(RUST_LIB_DEST ${CMAKE_SOURCE_DIR}/../aixrs/target/${Rust_CARGO_TARGET}/release/${RUST_LIB_FILENAME})
17+
set(RUST_BUILD_CMD cargo build --release --target ${Rust_CARGO_TARGET})
18+
else()
19+
set(RUST_LIB_DEST ${CMAKE_SOURCE_DIR}/../aixrs/target/release/${RUST_LIB_FILENAME})
20+
set(RUST_BUILD_CMD cargo build --release)
21+
endif()
22+
23+
add_custom_target(
24+
rust_lib
25+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../aixrs
26+
COMMAND ${RUST_BUILD_CMD}
27+
BYPRODUCTS ${RUST_LIB_DEST}
28+
)
29+
30+
project(${TARGET_NAME})
31+
include_directories(src/include)
32+
33+
file(GLOB_RECURSE EXTENSION_SOURCES "src/*.cpp")
34+
35+
build_static_extension(${TARGET_NAME} ${EXTENSION_SOURCES})
36+
build_loadable_extension(${TARGET_NAME} " " ${EXTENSION_SOURCES})
37+
38+
add_dependencies(${EXTENSION_NAME} rust_lib)
39+
add_dependencies(${LOADABLE_EXTENSION_NAME} rust_lib)
40+
target_link_libraries(${EXTENSION_NAME} ${RUST_LIB_DEST})
41+
target_link_libraries(${LOADABLE_EXTENSION_NAME} ${RUST_LIB_DEST})
42+
43+
if (WIN32)
44+
target_link_libraries(${EXTENSION_NAME} kernel32.lib)
45+
target_link_libraries(${EXTENSION_NAME} ntdll.lib)
46+
target_link_libraries(${EXTENSION_NAME} userenv.lib)
47+
target_link_libraries(${EXTENSION_NAME} ws2_32.lib)
48+
target_link_libraries(${EXTENSION_NAME} dbghelp.lib)
49+
50+
target_link_libraries(${LOADABLE_EXTENSION_NAME} kernel32.lib)
51+
target_link_libraries(${LOADABLE_EXTENSION_NAME} ntdll.lib)
52+
target_link_libraries(${LOADABLE_EXTENSION_NAME} userenv.lib)
53+
target_link_libraries(${LOADABLE_EXTENSION_NAME} ws2_32.lib)
54+
target_link_libraries(${LOADABLE_EXTENSION_NAME} dbghelp.lib)
55+
endif()
56+
57+
install(
58+
TARGETS ${EXTENSION_NAME}
59+
EXPORT "${DUCKDB_EXPORT_SET}"
60+
LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
61+
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}")

LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2018-2025 Stichting DuckDB Foundation
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
2+
3+
# Configuration of extension
4+
EXT_NAME=aixchess
5+
EXT_CONFIG=${PROJ_DIR}extension_config.cmake
6+
7+
# Include the Makefile from extension-ci-tools
8+
include extension-ci-tools/makefiles/duckdb_extension.Makefile

aix-chess-compression/Cargo.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "aix-chess-compression"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]
7+
chess-huffman = "0.12.1"
8+
shakmaty = "0.30"
9+
bitm = "0.5"
10+
11+
[dev-dependencies]
12+
quickcheck = "1"
13+
quickcheck_macros = "1.1"

0 commit comments

Comments
 (0)