Skip to content

Commit

Permalink
chore: Bump versions
Browse files Browse the repository at this point in the history
* graphviz - v5.0.1
* emsdk - v3.1.19

Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Aug 21, 2022
1 parent 27c9134 commit e2f345b
Show file tree
Hide file tree
Showing 17 changed files with 1,455 additions and 1,131 deletions.
14 changes: 6 additions & 8 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
.vscode/ipch
.vscode/
.nyc_output/
build/
coverage/
dist/
docker/
emsdk/
src-expat/
src-graphviz/
lib-*/
node_modules/
src-graphviz/
types/
vcpkg/
*.tsbuildinfo
.nyc_output/
coverage/
.vscode/c_cpp_properties.json
.vscode/settings.json
test/ubuntu-dev.dockerfile
4 changes: 2 additions & 2 deletions .github/workflows/testPullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
- run: npm run lint
- run: sudo apt-get update
- run: sudo apt-get install -y build-essential
- run: sudo apt-get install -y git cmake wget
- run: sudo apt-get install -y gcc-multilib g++-multilib pkg-config autoconf bison libtool flex zlib1g-dev
- run: sudo apt-get install -y git cmake wget zip
- run: sudo apt-get install -y gcc-multilib g++-multilib pkg-config autoconf bison libtool flex
- run: sudo apt-get install -y python3 python3-pip
- run: npm run install-build-deps
- run: npm run build;
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ SET(EM_FLAGS
"-s MODULARIZE"
"-s ENVIRONMENT=web,worker,node"
"-s FILESYSTEM=0"
"-s MINIMAL_RUNTIME=2"
# "-s MINIMAL_RUNTIME=1"
"-s MODULARIZE=1"
"-s EXPORT_ES6=1"
"-s IGNORE_CLOSURE_COMPILER_ERRORS=0"
"-s USE_ES6_IMPORT_META=0"
"--pre-js ${CMAKE_CURRENT_SOURCE_DIR}/cpp/src/pre.js"
"--post-js ${CMAKE_CURRENT_SOURCE_DIR}/cpp/src/post.js"
# "--pre-js ${CMAKE_CURRENT_SOURCE_DIR}/cpp/src/pre.js"
# "--post-js ${CMAKE_CURRENT_SOURCE_DIR}/cpp/src/post.js"
)

IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
![Test PR](https://github.com/hpcc-systems/hpcc-js-wasm/workflows/Test%20PR/badge.svg)

This repository contains a collection of useful c++ libraries compiled to WASM for (re)use in Node JS, Web Browsers and JavaScript Libraries:
* [graphviz](https://www.graphviz.org/) - v5.0.0
* [graphviz](https://www.graphviz.org/) - v5.0.1
* [expat](https://libexpat.github.io/) - v2.4.8

Built with:
* [emsdk](https://github.com/emscripten-core/emsdk) - v3.1.15
* [emsdk](https://github.com/emscripten-core/emsdk) - v3.1.19

## Quick GraphViz Demos
* https://raw.githack.com/hpcc-systems/hpcc-js-wasm/trunk/index.html
Expand Down
1 change: 0 additions & 1 deletion cpp/expat/expatlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ find_package(expat CONFIG REQUIRED)
# See: https://github.com/emscripten-core/emscripten/blob/main/src/settings.js
SET(EM_FLAGS
${EM_FLAGS}
"-s FILESYSTEM=1"
"-s EXPORT_NAME='${CMAKE_PROJECT_NAME}'"
"-s EXPORTED_FUNCTIONS=\"['_malloc']\""
"-s EXPORTED_RUNTIME_METHODS=\"[]\""
Expand Down
2 changes: 1 addition & 1 deletion cpp/graphviz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ option(use_sanitizers "enables using address and undefined behavior sanitizer"
option(use_coverage "enables analyzing code coverage" OFF)
option(with_cxx_api "enables building the C++ API" ON)
option(with_cxx_tests "enables building the C++ tests" OFF)
option(use_win_pre_inst_libs "enables building using pre-installed Windows libraries" ON)
option(use_win_pre_inst_libs "enables building using pre-installed Windows libraries" OFF)

if(with_digcola)
add_definitions(-DDIGCOLA)
Expand Down
1 change: 1 addition & 0 deletions cpp/graphviz/graphvizlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ PROJECT(graphvizlib)
# See: https://github.com/emscripten-core/emscripten/blob/main/src/settings.js
SET(EM_FLAGS
${EM_FLAGS}
"-s FILESYSTEM=1"
"-s EXPORT_NAME='${CMAKE_PROJECT_NAME}'"
"-s EXPORTED_FUNCTIONS=\"[_free]\""
"-s EXPORTED_RUNTIME_METHODS=\"[]\""
Expand Down
1 change: 0 additions & 1 deletion cpp/graphviz/lib/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ add_library(common_obj OBJECT
${GRAPHVIZ_LIB_DIR}/common/intset.h
${GRAPHVIZ_LIB_DIR}/common/htmllex.h
${GRAPHVIZ_LIB_DIR}/common/htmltable.h
${GRAPHVIZ_LIB_DIR}/common/logic.h
${GRAPHVIZ_LIB_DIR}/common/macros.h
${GRAPHVIZ_LIB_DIR}/common/memory.h
${GRAPHVIZ_LIB_DIR}/common/pointset.h
Expand Down
15 changes: 9 additions & 6 deletions docker/ubuntu-dev.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,25 @@ RUN apt-get upgrade -y
# Install pre-requisites (keep synced with README.md)
## NodeJS
RUN apt-get install -y curl
RUN curl --silent --location https://deb.nodesource.com/setup_14.x | bash -
RUN curl --silent --location https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get update
RUN apt-get install -y nodejs
RUN apt-get install -y build-essential

## Other
RUN apt-get install -y git cmake wget
RUN apt-get install -y gcc-multilib g++-multilib pkg-config autoconf bison libtool flex zlib1g-dev
RUN apt-get install -y build-essential
RUN apt-get install -y git cmake wget zip
RUN apt-get install -y gcc-multilib g++-multilib pkg-config autoconf bison libtool flex
RUN apt-get install -y python3 python3-pip

# Set the working directory
WORKDIR /usr/src/app

COPY ./scripts/* ./scripts/
COPY ./scripts ./scripts

RUN ./scripts/cpp-install-emsdk.sh
RUN ./scripts/cpp-install-graphviz.sh
RUN ./scripts/cpp-install-expat.sh
RUN ./scripts/cpp-install-vcpkg.sh
RUN ./vcpkg/bootstrap-vcpkg.sh

COPY . .

Expand Down
13 changes: 10 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@
<body>
<h3>Async DOT</h3>
<div id="placeholder"></div>
<br>
<hr>
<h3>Two</h3>
<div id="placeholder2"></div>
<br>
<div id="placeholder2b"></div>
<hr>
<h3>Sync DOT</h3>
<div id="placeholder3"></div>
<hr>
<h3>Cached wasmBinary</h3>
<div id="placeholder4"></div>
<h3>End</h3>
<hr>
<script>
hpccWasm.expatVersion().then(v => alert(v));
const dot = `
Expand Down Expand Up @@ -95,6 +97,11 @@ <h3>End</h3>
div.innerHTML = svg;
}).catch(err => console.error(err.message));

hpccWasm.graphviz.layout('digraph { a[image="./resources/hpcc-logo.png"]; }', "svg", "dot", { images: [{ path: "./resources/hpcc-logo.png", width: "272px", height: "92px" }] }).then(svg => {
const div = document.getElementById("placeholder2b");
div.innerHTML = svg;
}).catch(err => console.error(err.message));

hpccWasm.graphvizSync().then(graphviz => {
const div = document.getElementById("placeholder3");
try {
Expand Down
Loading

0 comments on commit e2f345b

Please sign in to comment.