Browse Source

build: enhance rust packing logic

master
Dnomd343 4 weeks ago
parent
commit
6ff6a2f0f5
  1. 8
      src/core/CMakeLists.txt
  2. 16
      src/core_ffi/rust_ffi/Cargo.toml
  3. 1
      src/core_ffi/rust_ffi/klotski/src/CMakeLists.txt
  4. 5
      src/core_ffi/rust_ffi/klotski/src/CMakeLists.txt
  5. 1
      src/core_ffi/rust_ffi/klotski/src/core_ffi/CMakeLists.txt
  6. 1
      src/core_ffi/rust_ffi/klotski/src/core_ffi/rust_ffi/CMakeLists.txt

8
src/core/CMakeLists.txt

@ -62,10 +62,10 @@ string(TIMESTAMP VERSION_BUILD "%Y-%m-%d %H:%M:%S")
set(COMPILER "${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
configure_file(
${PROJECT_SOURCE_DIR}/utils/metadata.h.in
${PROJECT_SOURCE_DIR}/utils/metadata.h
)
#configure_file(
# ${PROJECT_SOURCE_DIR}/utils/metadata.h.in
# ${PROJECT_SOURCE_DIR}/utils/metadata.h
#)
set(KLSK_CORE_SRC
ranges/internal/spawn.cc

16
src/core_ffi/rust_ffi/Cargo.toml

@ -4,10 +4,26 @@ version = "0.0.2"
edition = "2021"
authors = ["Dnomd343 <dnomd343@gmail.com>"]
description = "Klotski multifunctional engine with high performance"
categories = ["algorithms", "science", "games", "external-ffi-bindings"]
repository = "https://github.com/dnomd343/klotski"
license = "BSD-3-Clause"
readme = "README.md"
# TODO: add `homepage` and `documentation`
exclude = [
"/klotski/src/core/main.cc",
"/klotski/src/core/benchmark/",
#"/klotski/src/core/utils/metadata.h", # TODO: code generated in crate dir is not allowed in cargo.
# TODO: this is not a robust solution, we may link them manually.
"!/klotski/third_party/parallel-hashmap/LICENSE",
"!/klotski/third_party/parallel-hashmap/cmake/*.cmake",
"!/klotski/third_party/parallel-hashmap/CMakeLists.txt",
"!/klotski/third_party/parallel-hashmap/parallel_hashmap/*.h",
"/klotski/third_party/parallel-hashmap/",
]
[profile.release]
lto = "fat"
panic = "abort"

1
src/core_ffi/rust_ffi/klotski/src/CMakeLists.txt

@ -1 +0,0 @@
../../../../CMakeLists.txt

5
src/core_ffi/rust_ffi/klotski/src/CMakeLists.txt

@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.12)
add_subdirectory(core)
install(TARGETS klotski_core DESTINATION .)

1
src/core_ffi/rust_ffi/klotski/src/core_ffi/CMakeLists.txt

@ -1 +0,0 @@
../../../../CMakeLists.txt

1
src/core_ffi/rust_ffi/klotski/src/core_ffi/rust_ffi/CMakeLists.txt

@ -1 +0,0 @@
../../../../CMakeLists.txt
Loading…
Cancel
Save