You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.rst
+10-6
Original file line number
Diff line number
Diff line change
@@ -11,20 +11,24 @@ Pre-build archives are available at https://github.com/cpitclaudel/z3.wasm/relea
11
11
Building
12
12
========
13
13
14
+
In a VM
15
+
-------
16
+
14
17
Install `Vagrant <https://www.vagrantup.com/>`_, then run this::
15
18
16
19
vagrant up
17
20
vagrant ssh
18
21
VAGRANT=true /vagrant/z3.sh
19
22
20
-
The first build can take up to two hours (emscripten may require a custom build of LLVM, Z3 is large, and all of this is running in a VM).
21
-
The output is written to ``z3w.js``, ``z3w.wasm``, ``z3smt2w.js``, and ``z3smt2w.wasm``.
23
+
The first build can take up to two hours (emscripten may require a custom build of LLVM, Z3 is large, and all of this is running in a VM). The output (``z3w.js``, ``z3w.wasm``, ``z3smt2w.js``, and ``z3smt2w.wasm``) is written to ``build/z3/``.
22
24
23
-
On Debian/Ubuntu systems, you may prefer to run natively (the build will be much faster)::
25
+
Some Vagrant configurations can cause clang to crash or Vagrant to hang.
26
+
Building on a physical machine is the most reliable workaround.
24
27
25
-
BASEDIR="$(pwd)/build/" ./z3.sh
28
+
Natively
29
+
--------
26
30
27
-
Some Vagrant configurations can cause clang to crash; in that case, building on a physical machine is the best workaround.
31
+
On Debian/Ubuntu systems, you may prefer to build natively, which will be much faster. In that case, just run ``./z3.sh``, which will place all outputs in ``build/``.
28
32
29
33
Using the generated code
30
34
========================
@@ -61,7 +65,7 @@ From a webpage the process is roughly the same: write Z3's input to a file using
61
65
62
66
This is all demoed in ``html/z3.html`` (that example also uses a WebWorker to run Z3, keeping the page responsive while it runs). Try it like this::
63
67
64
-
cp z3-wasm/z3/z3w.js z3-wasm/z3/z3w.wasm ./html
68
+
cp build/z3/z3w.js build/z3/z3w.wasm ./html
65
69
python3 -m http.server
66
70
# Open your browser to http://localhost:8000/html/z3.html
0 commit comments