From 51e96f5754048eb6e96e3e312a7172ae0b217862 Mon Sep 17 00:00:00 2001 From: dowdyma1 Date: Thu, 2 Nov 2023 17:17:01 -0400 Subject: [PATCH] Improving Developer Onboarding Documentation (#883) * add comments to explain tutorials more * modify target directory command * add webassembly target command * change working app microblogging -> email. Has verbose readme --- apps/freenet-email-app/README.md | 24 ++++++++++++++++++++++++ docs/src/tutorial.md | 12 ++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/apps/freenet-email-app/README.md b/apps/freenet-email-app/README.md index 2acc42a24..2dfa69d0a 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 - ... +Add the target directory for the project. This should be an absolute file path to freenet-core/target. +```bash +export CARGO_TARGET_DIR="... freenet-core/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..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). @@ -15,18 +15,26 @@ 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 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