diff options
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | gnunet-build/packages/gnunet/gnunet/Buildrules | 41 | ||||
-rw-r--r-- | src/cljs/gnunet_web/ui.cljs | 1 | ||||
-rw-r--r-- | src/js/configuration.js | 4 |
4 files changed, 47 insertions, 2 deletions
@@ -14,7 +14,7 @@ Roadmap * gnunet-service-nse.js - Done, PoW not persistent yet. * gnunet-service-dht.js - Done. * gnunet-service-cadet.js - Done. - * gnunet-service-datastore.js - To do. + * gnunet-service-datastore.js - Building with heap backend plugin. * Needs an [indexedDB] backend plugin. * gnunet-service-fs.js - To do. * Write a minimal UI that allows publishing, searching, and downloading via the @@ -60,6 +60,5 @@ shared worker. [emscripten]: https://github.com/kripken/emscripten [rfc3264]: http://www.ietf.org/rfc/rfc3264.txt [web worker]: http://www.w3.org/TR/workers/ - [cors]: http://www.w3.org/TR/access-control/ [indexeddb]: http://www.w3.org/TR/IndexedDB/ diff --git a/gnunet-build/packages/gnunet/gnunet/Buildrules b/gnunet-build/packages/gnunet/gnunet/Buildrules index 143b648..98ec397 100644 --- a/gnunet-build/packages/gnunet/gnunet/Buildrules +++ b/gnunet-build/packages/gnunet/gnunet/Buildrules @@ -301,6 +301,47 @@ pkg_compile() { src/cadet/.libs/gnunet-service-cadet.data \ "${D}/var/lib/gnunet/js/" # + # Datastore + # + ./libtool --tag=CC --mode=link \ + emcc -fno-strict-aliasing -Wall \ + -O2 \ + -s DLOPEN_SUPPORT=1 -s SIDE_MODULE=1 \ + -s EXPORTED_FUNCTIONS='[ + "_libgnunet_plugin_datastore_heap_init" + ]' \ + "-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \ + -o "${S}/src/datastore/libgnunet_plugin_datastore_heap.js" \ + "${S}/src/datastore/plugin_datastore_heap.lo" + ( echo '[' + sed -e 's/.*/"&",/' < "${TEMP_DIR}/imports" + echo '"_GNUNET_log_setup",' + echo '"_GNUNET_STRINGS_fancy_size_to_bytes",' + echo '"_GNUNET_xstrdup_",' + echo '"_main"]' ) > datastore.exports + ./libtool --tag=CC --mode=link \ + emcc -fno-strict-aliasing -Wall \ + -O2 \ + -s DLOPEN_SUPPORT=1 -s MAIN_MODULE=1 \ + -s EXPORTED_FUNCTIONS=@datastore.exports \ + "-I${SYSROOT}/usr/include" "-L${SYSROOT}/usr/lib" \ + -o "${S}/src/datastore/gnunet-service-datastore.js" \ + "${S}/src/datastore/gnunet-service-datastore.o" \ + "${S}/src/statistics/libgnunetstatistics.la" \ + "${S}/src/util/libgnunetutil.la" \ + "${SYSROOT}/usr/lib/libgcrypt.la" \ + "${SYSROOT}/usr/lib/libgpg-error.la" \ + --js-library "${BUILDROOT}/src/js/configuration.js" \ + --js-library "${BUILDROOT}/src/js/plugin.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/datastore/libgnunet_plugin_datastore_heap.js"@/libgnunet_plugin_datastore_heap + cp src/datastore/.libs/gnunet-service-datastore.js \ + src/datastore/.libs/gnunet-service-datastore.data \ + "${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 af84d4b..eaf9116 100644 --- a/src/cljs/gnunet_web/ui.cljs +++ b/src/cljs/gnunet_web/ui.cljs @@ -32,6 +32,7 @@ (start-peerinfo) (def topology-worker (start-worker "topology" "js/gnunet-daemon-topology.js")) (def cadet-worker (start-worker "cadet" "js/gnunet-service-cadet.js")) +(def datastore-worker (start-worker "datastore" "js/gnunet-service-datastore.js")) (.addEventListener (by-id :hostlist) diff --git a/src/js/configuration.js b/src/js/configuration.js index af81e31..86d8a7a 100644 --- a/src/js/configuration.js +++ b/src/js/configuration.js @@ -65,6 +65,10 @@ mergeInto(LibraryManager.library, { REFRESH_CONNECTION_TIME: '5 min', ID_ANNOUNCE_TIME: '1 h', }, + DATASTORE: { + DATABASE: 'heap', + QUOTA: '64 MB', + }, }, GNUNET_CONFIGURATION_get_value__deps: ['$CONFIG'], GNUNET_CONFIGURATION_get_value: function(section, option) { |