File size: 1,060 Bytes
119e586 | 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 | #!/bin/bash
# Build NASM ASM + Node.js C++ binding for SKC-LISP validators
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
BUILD_DIR="$DIR/build"
echo "[SKC-LISP] Building native validators..."
# Create build directory
mkdir -p "$BUILD_DIR/Release"
# Assemble NASM modules
echo "[SKC-LISP] Assembling NASM modules..."
nasm -f elf64 -o "$BUILD_DIR/Release/mutation-validator.o" "$DIR/mutation-validator.asm"
nasm -f elf64 -o "$BUILD_DIR/Release/digest-verifier.o" "$DIR/digest-verifier.asm"
# Link into shared library
echo "[SKC-LISP] Linking ASM library..."
ld -shared -o "$BUILD_DIR/Release/libskclisp_asm.so" \
"$BUILD_DIR/Release/mutation-validator.o" \
"$BUILD_DIR/Release/digest-verifier.o"
# Build Node.js addon with node-gyp
echo "[SKC-LISP] Building Node.js addon..."
cd "$DIR"
node-gyp configure
node-gyp build --debug
# or: node-gyp build (for release)
echo "[SKC-LISP] Build complete: $BUILD_DIR/Release/skclisp_native.node"
echo "[SKC-LISP] ASM library: $BUILD_DIR/Release/libskclisp_asm.so"
|