From 8b1b88ff0ad5b53908596c94bd4fc8e492e33bc9 Mon Sep 17 00:00:00 2001 From: Matthew Dowdy Date: Wed, 1 Nov 2023 21:21:43 -0400 Subject: [PATCH 1/4] add comments to explain tutorials more --- apps/freenet-email-app/README.md | 24 ++++++++++++++++++++++++ docs/src/tutorial.md | 5 ++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/apps/freenet-email-app/README.md b/apps/freenet-email-app/README.md index 2acc42a24..07dd212ba 100644 --- a/apps/freenet-email-app/README.md +++ b/apps/freenet-email-app/README.md @@ -15,11 +15,30 @@ local node, which simulates a node on the network. ```bash curl https://sh.rustup.rs -sSf | sh ``` +- (Ubuntu) + ```bash + sudo apt-get update + sudo apt-get install libssl-dev libclang-dev pkg-config + ``` - Install the Freeenet development tool (fdev) and a working Freenet kernel that can be used for local development. Use cargo to install it: ```bash cargo install freenet cargo install fdev ``` +- Install Dioxus-CLI, a GUI library for rust + ```bash + cargo install dioxus-cli + ``` +- Add WebAssembly target + ```bash + rustup target add wasm32-unknown-unknown + ``` +- Initializing & Fetching Submodules + ```bash + git submodule update --init --recursive + ``` +### Note about MacOS +Email account creation currently does not work on MacOS ## Prepare the Freenet email contracts and delegates @@ -39,6 +58,11 @@ This delegate is located inside the modules folder of freenet-core: - `Makefile` <-- this file contains the build instructions for the delegate - ... +Before building the delegate, cargo needs to know where to generate binaries: +```bash +export CARGO_TARGET_DIR="./target" +``` + To build the delegate, go to the `identity-management` folder and run the following command: ```bash diff --git a/docs/src/tutorial.md b/docs/src/tutorial.md index 9f7ba6df9..1f16d9f30 100644 --- a/docs/src/tutorial.md +++ b/docs/src/tutorial.md @@ -15,13 +15,16 @@ Mac (for Windows see [here](https://rustup.rs)): curl https://sh.rustup.rs -sSf | sh ``` +#### Note for MacOS install +Do not have the `brew` version of rust installed as it will cause compications with `fdev`. + ### Freenet development tool (fdev) Once you have a working installation of Cargo you can install the Freenet dev tools: ```bash -cargo install freenet +cargo install freenet fdev ``` This command will install `fdev` (Freenet development tool) and a working Freenet kernel that can From b6d4f4a2f3b5137b9c99e800f08af609f8a2c4a5 Mon Sep 17 00:00:00 2001 From: Matthew Dowdy Date: Wed, 1 Nov 2023 21:44:04 -0400 Subject: [PATCH 2/4] modify target directory command --- apps/freenet-email-app/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/freenet-email-app/README.md b/apps/freenet-email-app/README.md index 07dd212ba..2dfa69d0a 100644 --- a/apps/freenet-email-app/README.md +++ b/apps/freenet-email-app/README.md @@ -58,9 +58,9 @@ This delegate is located inside the modules folder of freenet-core: - `Makefile` <-- this file contains the build instructions for the delegate - ... -Before building the delegate, cargo needs to know where to generate binaries: +Add the target directory for the project. This should be an absolute file path to freenet-core/target. ```bash -export CARGO_TARGET_DIR="./target" +export CARGO_TARGET_DIR="... freenet-core/target" ``` To build the delegate, go to the `identity-management` folder and run the following command: From 5583d67fc299f7eefbf3521f7559a1716a363351 Mon Sep 17 00:00:00 2001 From: Matthew Dowdy Date: Thu, 2 Nov 2023 12:49:52 -0400 Subject: [PATCH 3/4] add webassembly target command --- docs/src/tutorial.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/src/tutorial.md b/docs/src/tutorial.md index 1f16d9f30..d4eba44f8 100644 --- a/docs/src/tutorial.md +++ b/docs/src/tutorial.md @@ -30,6 +30,11 @@ cargo install freenet fdev This command will install `fdev` (Freenet development tool) and a working Freenet kernel that can be used for local development. +### Add WebAssembly target +```bash +rustup target add wasm32-unknown-unknown +``` + ### Node.js and TypeScript To build user interfaces in JavaScript or TypeScript, you need to have Node.js From 721b01ae655353df3dcf152f8d372883f0cb50f8 Mon Sep 17 00:00:00 2001 From: Matthew Dowdy Date: Thu, 2 Nov 2023 12:52:27 -0400 Subject: [PATCH 4/4] change working app microblogging -> email. Has verbose readme --- docs/src/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/tutorial.md b/docs/src/tutorial.md index d4eba44f8..96fd1da0f 100644 --- a/docs/src/tutorial.md +++ b/docs/src/tutorial.md @@ -1,6 +1,6 @@ # Getting Started -This tutorial will show you how to build decentralized software on Freenet. For a similar working and up to date example check the `freenet-microblogging` app (located in under the `apps/freenet-microblogging` directory in the `freenet-core` repository). +This tutorial will show you how to build decentralized software on Freenet. For a similar working and up to date example check the `freenet-email` app (located in under the `apps/freenet-email-app` directory in the `freenet-core` repository).