aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--gnunet-build/packages/gnunet/gnunet/Buildrules46
-rw-r--r--src/cljs/gnunet_web/ui.cljs2
-rw-r--r--src/js/configuration.js6
4 files changed, 49 insertions, 9 deletions
diff --git a/README.md b/README.md
index 484880b..b580c93 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ Roadmap
* gnunet-service-core.js - Done.
* gnunet-service-nse.js - Done, PoW not persistent yet.
* gnunet-service-dht.js - Done.
- * gnunet-service-cadet.js - To do.
+ * gnunet-service-cadet.js - Done.
* gnunet-service-datastore.js - To do.
* Needs an [indexedDB] backend plugin.
* gnunet-service-fs.js - To do.
@@ -47,7 +47,7 @@ What You Can Do Now
1. Execute `lein run`
2. Open http://localhost:3000/gnunet.html
-Each GNUnet service running in its own [Web Worker] thread. The APIs used by
+Each GNUnet service is running in its own [Web Worker] thread. The APIs used by
the services to schedule tasks, communicate with each other, and load plugins
are implemented as emscripten js libraries.
diff --git a/gnunet-build/packages/gnunet/gnunet/Buildrules b/gnunet-build/packages/gnunet/gnunet/Buildrules
index 227505a..56ec1b9 100644
--- a/gnunet-build/packages/gnunet/gnunet/Buildrules
+++ b/gnunet-build/packages/gnunet/gnunet/Buildrules
@@ -46,12 +46,12 @@ pkg_compile() {
( echo '['
sed -e 's/.*/"&",/' < "${TEMP_DIR}/imports"
echo '"_GNUNET_log_setup",'
- echo '"_main"]' ) > transport_http_client.imports
+ echo '"_main"]' ) > transport.exports
./libtool --tag=CC --mode=link \
emcc -fno-strict-aliasing -Wall \
-O2 \
-s DLOPEN_SUPPORT=1 -s MAIN_MODULE=1 \
- -s EXPORTED_FUNCTIONS=@transport_http_client.imports \
+ -s EXPORTED_FUNCTIONS=@transport.exports \
"-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
-o "${S}/src/transport/gnunet-service-transport.js" \
"${S}/src/transport/gnunet_service_transport-gnunet-service-transport"*.o \
@@ -92,13 +92,13 @@ pkg_compile() {
echo '"_GNUNET_CONFIGURATION_get_value_float",'
echo '"_GNUNET_log_setup",'
echo '"_GNUNET_xstrdup_",'
- echo '"_main"]' ) > plugin_ats_proportional.imports
+ echo '"_main"]' ) > ats.exports
./libtool --tag=CC --mode=link \
emcc -fno-strict-aliasing -Wall \
-O2 \
-s DLOPEN_SUPPORT=1 -s MAIN_MODULE=1 \
-s TOTAL_MEMORY=33554432 \
- -s EXPORTED_FUNCTIONS=@plugin_ats_proportional.imports \
+ -s EXPORTED_FUNCTIONS=@ats.exports \
"-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
-o "${S}/src/ats/gnunet-service-ats.js" \
"${S}/src/ats/gnunet-service-ats"*.o \
@@ -228,12 +228,12 @@ pkg_compile() {
echo '"_GNUNET_log_setup",'
echo '"_GNUNET_STRINGS_fancy_size_to_bytes",'
echo '"_GNUNET_xstrdup_",'
- echo '"_main"]' ) > dht.imports
+ echo '"_main"]' ) > dht.exports
./libtool --tag=CC --mode=link \
emcc -fno-strict-aliasing -Wall \
-O2 \
-s DLOPEN_SUPPORT=1 -s MAIN_MODULE=1 \
- -s EXPORTED_FUNCTIONS=@dht.imports \
+ -s EXPORTED_FUNCTIONS=@dht.exports \
"-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
-o "${S}/src/dht/gnunet-service-dht.js" \
"${S}/src/dht/gnunet-service-dht"*.o \
@@ -263,6 +263,40 @@ pkg_compile() {
src/dht/.libs/gnunet-service-dht.data \
"${D}/var/lib/gnunet/js/"
#
+ # Cadet
+ #
+ ( echo '['
+ sed -e 's/.*/"&",/' < libgnunet_plugin_block_dht.imports
+ echo '"_GNUNET_log_setup",'
+ echo '"_GNUNET_STRINGS_fancy_time_to_relative",'
+ echo '"_main"]' ) > cadet.exports
+ ./libtool --tag=CC --mode=link \
+ emcc -fno-strict-aliasing -Wall \
+ -s EXPORTED_FUNCTIONS=@cadet.exports \
+ "-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \
+ -o "${S}/src/cadet/gnunet-service-cadet.js" \
+ "${S}/src/cadet/gnunet_service_cadet"*.o \
+ "${S}/src/block/libgnunetblock.la" \
+ "${S}/src/core/libgnunetcore.la" \
+ "${S}/src/dht/libgnunetdht.la" \
+ "${S}/src/hello/libgnunethello.la" \
+ "${S}/src/peerinfo/libgnunetpeerinfo.la" \
+ "${S}/src/statistics/libgnunetstatistics.la" \
+ "${S}/src/transport/libgnunettransport.la" \
+ "${S}/src/util/libgnunetutil.la" \
+ "${SYSROOT}/usr/lib/libgcrypt.la" \
+ "${SYSROOT}/usr/lib/libgpg-error.la" \
+ -lz \
+ --js-library "${BUILDROOT}/src/js/client.js" \
+ --js-library "${BUILDROOT}/src/js/configuration.js" \
+ --js-library "${BUILDROOT}/src/js/scheduler.js" \
+ --js-library "${BUILDROOT}/src/js/server.js" \
+ --js-library "${BUILDROOT}/src/js/service.js" \
+ --pre-js "${BUILDROOT}/src/js/pre.js" \
+ --preload-file "${S}/src/dht/libgnunet_plugin_block_dht.js"@/libgnunet_plugin_block_dht
+ cp src/cadet/.libs/gnunet-service-cadet.js \
+ "${D}/var/lib/gnunet/js/"
+ #
# Hostlist
#
cat contrib/hellos/* > "${D}/var/lib/gnunet/hostlist"
diff --git a/src/cljs/gnunet_web/ui.cljs b/src/cljs/gnunet_web/ui.cljs
index f34b5e1..af84d4b 100644
--- a/src/cljs/gnunet_web/ui.cljs
+++ b/src/cljs/gnunet_web/ui.cljs
@@ -31,7 +31,7 @@
(start-peerinfo)
(def topology-worker (start-worker "topology" "js/gnunet-daemon-topology.js"))
-(def dht-worker (start-worker "dht" "js/gnunet-service-dht.js"))
+(def cadet-worker (start-worker "cadet" "js/gnunet-service-cadet.js"))
(.addEventListener
(by-id :hostlist)
diff --git a/src/js/configuration.js b/src/js/configuration.js
index e552ad6..af81e31 100644
--- a/src/js/configuration.js
+++ b/src/js/configuration.js
@@ -59,6 +59,12 @@ mergeInto(LibraryManager.library, {
INTERVAL: '1 h',
WORKBITS: 22,
},
+ CADET: {
+ MAX_MSGS_QUEUE: 10000,
+ MAX_CONNECTIONS: 1000,
+ REFRESH_CONNECTION_TIME: '5 min',
+ ID_ANNOUNCE_TIME: '1 h',
+ },
},
GNUNET_CONFIGURATION_get_value__deps: ['$CONFIG'],
GNUNET_CONFIGURATION_get_value: function(section, option) {