nissy-core

The "engine" of nissy, including the H48 optimal solver.
git clone https://git.tronto.net/nissy-core
Download | Log | Files | Refs | README | LICENSE

commit 435107ce4faeab84678fcd1d7c44837025c6ae68
parent 325778cb5f4b169ef7e197e179cfb889808d10c2
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Fri, 15 Aug 2025 19:09:44 +0200

Updates to container runner and removed simd from wasm build

Diffstat:
Mbuild.sh | 5++---
Mutils/container-run.sh | 60++++++++++++++++++++++++++++++++++++++++--------------------
2 files changed, 42 insertions(+), 23 deletions(-)

diff --git a/build.sh b/build.sh @@ -148,11 +148,10 @@ CPPFLAGS="-std=c++20 $(maybe_pthread)" # The options below have to be adjusted when native WASM_SIMD is implemented. # Build flags for emscripten (WASM target) -WASMCFLAGS="-std=c11 -fPIC -D_POSIX_C_SOURCE=199309L $(maybe_pthread) - -mfpu=neon -mrelaxed-simd" +WASMCFLAGS="-std=c11 -fPIC -D_POSIX_C_SOURCE=199309L $(maybe_pthread)" WASMCPPFLAGS="-std=c++20 $(maybe_pthread)" WASMDBGFLAGS="-sASSERTIONS" -WASMMFLAGS="-DTHREADS=$THREADS -DNEON" +WASMMFLAGS="-DTHREADS=$THREADS -DPORTABLE" WASMLINKFLAGS="--no-entry -sEXPORT_NAME='Nissy' -sMODULARIZE -sEXPORTED_RUNTIME_METHODS=addFunction,UTF8ToString -sALLOW_TABLE_GROWTH diff --git a/utils/container-run.sh b/utils/container-run.sh @@ -24,8 +24,9 @@ usage() { echo "If COMMAND is unspecified, an interactive shell will be opened." echo "" echo "Available platforms:" - echo "x86 (equivalent to: x86_64, amd64)" - echo "arm (equivalent to: arm64)" + echo "x86 (equivalent to: x86_64, amd64)" + echo "arm (equivalent to: arm64)" + echo "emscripten" echo "" echo "Examples:" echo "$0 ram ./build.sh test # Run unit tests in arm container" @@ -36,13 +37,48 @@ if [ -z "$1" ]; then usage "No platform given." fi +config_standard() { + image="localhost/nissy/alpine-$1" + platform="--platform=linux/$1" + mount="--mount type=bind,src=./,dst=/nissy-core" + flags="--rm --privileged" + + dockerfile="$(mktemp)" + cat > "$dockerfile" << EOF + FROM alpine:3.22 + RUN apk update + RUN apk add gcc g++ clang python3 python3-dev + RUN mkdir /nissy-core + WORKDIR /nissy-core + USER 1000:1000 +EOF +} + +config_emscripten() { + image="localhost/nissy/emscripten" + platform="--platform=linux/amd64" + mount="--mount type=bind,src=./,dst=/nissy-core" + flags="--rm --privileged" + + dockerfile="$(mktemp)" + cat > "$dockerfile" << EOF + FROM emscripten/emsdk + WORKDIR /nissy-core + USER 1000:1000 +EOF +} + case "$1" in x86|x86_64|amd64) - p=amd64 + config_standard amd64 shift ;; arm|arm64) - p=arm64 + config_standard arm64 + shift + ;; +emscripten) + config_emscripten shift ;; *) @@ -50,22 +86,6 @@ arm|arm64) ;; esac -image="localhost/nissy/alpine-$p" -platform="--platform=linux/$p" -mount="--mount type=bind,src=./,dst=/nissy-core" -flags="--rm --privileged" - -dockerfile="$(mktemp)" -cat > "$dockerfile" << EOF -FROM alpine:3.22.1 -RUN apk update -RUN apk add gcc g++ clang python3 python3-dev -#COPY . ./nissy-core -RUN mkdir /nissy-core -WORKDIR /nissy-core -USER 1000:1000 -EOF - docker build "$platform" -f "$dockerfile" -t "$image" . rm "$dockerfile"