diff --git a/wasm/README.md b/wasm/README.md index eac8ff00e..1dba498d7 100644 --- a/wasm/README.md +++ b/wasm/README.md @@ -1,11 +1,11 @@ -# Run nimbus state sim in a browser +# Run nimbus ncli in a browser Simple runners for in-browser running of WASM versions of applications - based on emscripten-generated code. ``` # Make sure you have built nimbus-eth2 with make first! -./build.sh +./build_ncli.sh # Run a http server here (wasm + file:/// apparently don't mix) python -m SimpleHTTPServer diff --git a/wasm/build.sh b/wasm/build.sh deleted file mode 100755 index 2aa8612cf..000000000 --- a/wasm/build.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -# Simple build script to produce an Emscripten-based wasm version of the state -# sim. -# Assumes you have emcc latest-upstream in you PATH, per their install -# instructions (https://emscripten.org/docs/getting_started/downloads.html) -# -# git clone https://github.com/emscripten-core/emsdk.git -# cd emsdk -# git pull -# ./emsdk install latest-upstream -# ./emsdk activate latest-upstream -# source ./emsdk_env.sh - -# Clean build every time - we use wildcards below so this keeps it simple -rm -rf state_sim/nimcache - -# GC + emcc optimizer leads to crashes - for now, we disable the GC here -../env.sh nim c \ - --cpu:i386 --os:linux --gc:none --threads:off \ - -d:release -d:clang -d:emscripten -d:noSignalHandler -d:usemalloc \ - --nimcache:state_sim/nimcache \ - -c ../research/state_sim.nim - -../env.sh emcc \ - -I ../vendor/nimbus-build-system/vendor/Nim/lib \ - state_sim/nimcache/*.c \ - ../vendor/nim-blscurve/blscurve/csources/32/{big_384_29.c,ecp2_BLS381.c,rom_curve_BLS381.c,ecp_BLS381.c,fp2_BLS381.c,fp_BLS381.c,rom_field_BLS381.c,pair_BLS381.c,fp12_BLS381.c,fp4_BLS381.c} \ - -s ERROR_ON_UNDEFINED_SYMBOLS=0 \ - -s TOTAL_MEMORY=1073741824 \ - -s EXTRA_EXPORTED_RUNTIME_METHODS=FS \ - -s WASM=1 \ - --shell-file state_sim_shell.html \ - -O3 \ - -o state_sim/state_sim.html diff --git a/wasm/index.html b/wasm/index.html deleted file mode 100644 index 5c2063c4c..000000000 --- a/wasm/index.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - -
- - -Ethereum Beacon Chain state transition simulation (unoptimized work in progress, you might run out of memory)
- -Ethereum Beacon Chain state transition simulation (unoptimized work in progress, you might run out of memory)
- -