aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md12
-rwxr-xr-xbuild-gnunet.sh16
-rw-r--r--resources/public/gnunet.html14
3 files changed, 29 insertions, 13 deletions
diff --git a/README.md b/README.md
index 91ebd4e..2c8c0da 100644
--- a/README.md
+++ b/README.md
@@ -33,19 +33,19 @@ What You Can Do Now
### Compile GNUnet with emscripten ###
0. Install [emscripten] and add it to your `PATH`.
1. Execute `./build-gnunet.sh`
-2. Load src/peerinfo/.libs/gnunet-service-peerinfo.html in a browser.
+2. Execute `lein run`
+3. Open http://localhost:3000/gnunet.html
We're a long way from running GNUnet in the browser. Currently we have the
-peerinfo service linked into an HTML file which displays error messages in a
-text box.
+peerinfo service linked into a javascript file which will load but has no
+way of receiving commands.
Eventually we will have each GNUnet service running in its own [Web Worker]
-thread. The services normally communicate through UNIX sockets which we will
-implement using [Web Messaging].
+thread. The APIs used by the services to schedule tasks and communicate with
+each other is being implemented in javascript.
[gnunet]: https://gnunet.org
[webrtc]: http://www.webrtc.org
[emscripten]: https://github.com/kripken/emscripten
[rfc3264]: http://www.ietf.org/rfc/rfc3264.txt
[web worker]: http://www.w3.org/TR/workers/
- [web messaging]: http://www.w3.org/TR/webmessaging/
diff --git a/build-gnunet.sh b/build-gnunet.sh
index 8ddfccc..9151f8b 100755
--- a/build-gnunet.sh
+++ b/build-gnunet.sh
@@ -214,10 +214,10 @@ EMCONFIGURE_JS=1 emconfigure ./configure --prefix="$SYSROOT" \
emmake make \
LDFLAGS=-Wc,--ignore-dynamic-linking ||
die "Unable to make GNUnet"
-# Test-build an html file for gnunet-service-peerinfo
+# Link gnunet services and install them into resources/public/js
./libtool --tag=CC --mode=link \
emcc -fno-strict-aliasing -Wall "-I$SYSROOT/include" "-L$SYSROOT/lib" \
- -o src/peerinfo/gnunet-service-peerinfo.html \
+ -o src/peerinfo/gnunet-service-peerinfo.js \
src/peerinfo/gnunet-service-peerinfo.o \
src/hello/libgnunethello.la \
src/statistics/libgnunetstatistics.la \
@@ -225,11 +225,13 @@ emmake make \
"$SYSROOT/lib/libgcrypt.la" \
"$SYSROOT/lib/libgpg-error.la" \
-lm -lsocket \
- --js-library ../../configuration.js \
- --js-library ../../scheduler.js \
- --js-library ../../server.js \
- --js-library ../../service.js \
- --pre-js ../../pre.js
+ --js-library "$BUILDROOT/configuration.js" \
+ --js-library "$BUILDROOT/scheduler.js" \
+ --js-library "$BUILDROOT/server.js" \
+ --js-library "$BUILDROOT/service.js" \
+ --pre-js "$BUILDROOT/pre.js"
+cp src/peerinfo/.libs/gnunet-service-peerinfo.js \
+ "$BUILDROOT/resources/public/js/"
cd "$BUILDROOT"
# vim: set expandtab ts=2 sw=2:
diff --git a/resources/public/gnunet.html b/resources/public/gnunet.html
new file mode 100644
index 0000000..5ab51fd
--- /dev/null
+++ b/resources/public/gnunet.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel="stylesheet" href="css/page.css" />
+ <title>GNUnet</title>
+ </head>
+ <body>
+ <div>
+ <textarea id="message">This textarea intentionally left blank.</textarea>
+ </div>
+ <script src="js/gnunet-service-peerinfo.js"></script>
+ </body>
+</html>
+<!-- vim: set expandtab ts=2 sw=2: -->