Skip to content

Commit

Permalink
various improvements to tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Apr 17, 2024
1 parent 08ecfa3 commit c3c8295
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions docs/src/tutorial.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Getting Started
# Introduction

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).
This tutorial will show you how to build decentralized software on Freenet. For an example
application please see [apps/freenet-email-app](https://github.com/freenet/freenet-core/tree/main/apps/freenet-email-app).

<!-- toc -->

Expand All @@ -19,12 +18,13 @@ 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`.
The brew version of Rust will cause problems with `fdev`, we recommend installing Rust
using `rustup` as described above.

### Freenet development tool (fdev)
### Installing Freenet and fdev

Once you have a working installation of Cargo you can install the Freenet dev
tools:
Once you have a working installation of Cargo you can install `freenet` and `fdev`, a
command-line development tool:

```bash
cargo install freenet fdev
Expand All @@ -35,6 +35,8 @@ be used for local development.

### Add WebAssembly target

To allow Rust to compile to WebAssembly, you need to add the WebAssembly target using `rustup`:

```bash
rustup target add wasm32-unknown-unknown
```
Expand Down Expand Up @@ -69,23 +71,21 @@ This command should output the version of TypeScript that you installed.
## Creating a new contract

You can create a new [contract](glossary.md#contract) skeleton by executing the
`new` command with `fdev`. Two contract types are supported currently by the
tool, regular [contracts](glossary.md#contract), and [web
application](glossary.md#web-application) [container
contracts](glossary.md#container-contract). Currently, the following
technological stacks are supported (more to be added in the future):
`new` command with `fdev`. Fdev supports two types of contracts:
regular [contracts](glossary.md#contract), and [web application](glossary.md#web-application) [container
contracts](glossary.md#container-contract). Fdev supports several languages:

- Regular contracts:
- Rust (_default_)
- Web applications:
- Container development:
- Rust (_default_)
- Web/state development:
- Typescript. (_default: using npm and webpack_)
- TypeScript. (_default: using npm and webpack_)
- JavaScript.
- Rust (**WIP**).

We will need to create a directory that will hold our web app and initialize it:
We create a directory to hold our web app, and initialize it using `fdev`:

```bash
mkdir -p my-app/web
Expand All @@ -94,7 +94,7 @@ cd my-app/web
fdev new web-app
```

will create the skeleton for a web application and its container contract for
This will create the skeleton for a web application and its container contract for
Freenet ready for development at the `my-app/web` directory.

## Making a container contract
Expand Down

0 comments on commit c3c8295

Please sign in to comment.