-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-linux.sh
More file actions
executable file
·35 lines (29 loc) · 1.43 KB
/
build-linux.sh
File metadata and controls
executable file
·35 lines (29 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
# Build script for SimplifierLinux on Linux x86-64
# Requirements: Rust toolchain, CMake >= 3.16, C++20-capable compiler (GCC 11+ or Clang 13+), .NET 8 SDK
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
# ── 1. Build C++ native libraries (Mba.FFI and Espresso) with CMake ──────────
# Must run before Rust so libMba.FFI.so exists in native/ when the linker runs.
echo "==> Building native C++ libraries (CMake)..."
rm -rf native/build
mkdir -p native/build
cmake -S . -B native/build -DCMAKE_BUILD_TYPE=Release
cmake --build native/build --parallel "$(nproc)"
# Produces: native/libMba.FFI.so and native/libEspresso.so
# ── 2. Build Rust EqSat shared library ───────────────────────────────────────
echo "==> Building EqSat (Rust)..."
(cd EqSat && cargo build --release)
# Produces: EqSat/target/release/libeq_sat.so
# ── 3. Build and publish the .NET application ─────────────────────────────────
echo "==> Building .NET application..."
dotnet publish Simplifier/Simplifier.csproj \
--configuration Release \
--output publish/
echo ""
echo "Build complete. Run the application with:"
echo " ./publish/Simplifier \"<expression>\""
echo ""
echo "Example:"
echo " ./publish/Simplifier \"(x & y) + (x | y)\""