Skip to content

Commit

Permalink
Restructured docs to account for operators
Browse files Browse the repository at this point in the history
  • Loading branch information
christos-h committed May 21, 2024
1 parent 60ef1e9 commit ddfaee6
Show file tree
Hide file tree
Showing 41 changed files with 87 additions and 69 deletions.
4 changes: 4 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ default-theme = "Light"
default-dark-theme = "Ayu"
additional-js = ["custom.js"]

[output.html.fold]
enable = true
level = 0

[output.html.playground]
runnable = false

Expand Down
2 changes: 1 addition & 1 deletion linera-protocol
Submodule linera-protocol updated 423 files
92 changes: 48 additions & 44 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,53 @@
# Summary

[The Linera Developer Manual](introduction.md)

- [Getting Started](getting_started.md)

- [Installation](getting_started/installation.md)
- [Hello, Linera](getting_started/hello_linera.md)

- [The Linera Protocol](core_concepts.md)

- [Overview](core_concepts/overview.md)
- [Microchains](core_concepts/microchains.md)
- [Wallets](core_concepts/wallets.md)
- [Node Service](core_concepts/node_service.md)
- [Applications](core_concepts/applications.md)

- [Writing Linera Applications](sdk.md)

- [Creating a Project](sdk/creating_a_project.md)
- [Creating the Application State](sdk/state.md)
- [Defining the ABI](sdk/abi.md)
- [Writing the Contract Binary](sdk/contract.md)
- [Writing the Service Binary](sdk/service.md)
- [Deploying the Application](sdk/deploy.md)
- [Cross-Chain Messages](sdk/messages.md)
- [Calling other Applications](sdk/composition.md)
- [Printing Logs from an Application](sdk/logging.md)
- [Writing Tests](sdk/testing.md)

- [Advanced Topics](advanced_topics.md)

- [Views](advanced_topics/views.md)
- [Persistent Storage](advanced_topics/persistent_storage.md)
- [Contract Finalization](advanced_topics/contract_finalize.md)
- [Validators](advanced_topics/validators.md)
- [Creating New Blocks](advanced_topics/block_creation.md)
- [Applications that Handle Assets](advanced_topics/assets.md)

- [Experimental](experimental.md)

- [Machine Learning](experimental/ml.md)

- [Appendix](appendix.md)
- [Glossary](appendix/glossary.md)
- [Videos](appendix/videos.md)
[The Linera Manual](introduction.md)

- [Developers](./developers.md)

- [Getting Started](developers/getting_started.md)

- [Installation](developers/getting_started/installation.md)
- [Hello, Linera](developers/getting_started/hello_linera.md)

- [The Linera Protocol](developers/core_concepts.md)

- [Overview](developers/core_concepts/overview.md)
- [Microchains](developers/core_concepts/microchains.md)
- [Wallets](developers/core_concepts/wallets.md)
- [Node Service](developers/core_concepts/node_service.md)
- [Applications](developers/core_concepts/applications.md)

- [Writing Linera Applications](developers/sdk.md)

- [Creating a Project](developers/sdk/creating_a_project.md)
- [Creating the Application State](developers/sdk/state.md)
- [Defining the ABI](developers/sdk/abi.md)
- [Writing the Contract Binary](developers/sdk/contract.md)
- [Writing the Service Binary](developers/sdk/service.md)
- [Deploying the Application](developers/sdk/deploy.md)
- [Cross-Chain Messages](developers/sdk/messages.md)
- [Calling other Applications](developers/sdk/composition.md)
- [Printing Logs from an Application](developers/sdk/logging.md)
- [Writing Tests](developers/sdk/testing.md)

- [Advanced Topics](developers/advanced_topics.md)

- [Views](developers/advanced_topics/views.md)
- [Persistent Storage](developers/advanced_topics/persistent_storage.md)
- [Contract Finalization](developers/advanced_topics/contract_finalize.md)
- [Validators](developers/advanced_topics/validators.md)
- [Creating New Blocks](developers/advanced_topics/block_creation.md)
- [Applications that Handle Assets](developers/advanced_topics/assets.md)

- [Experimental](developers/experimental.md)

- [Machine Learning](developers/experimental/ml.md)

- [Appendix](developers/appendix.md)
- [Glossary](developers/appendix/glossary.md)
- [Videos](developers/appendix/videos.md)

- [Operators](operators.md)

<!-- prettier-ignore-start -->
<!--
Expand Down
3 changes: 3 additions & 0 deletions src/developers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Developer Manual

This section of the Linera Manual is for developers building applications on Linera.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ available to create new microchains and obtain some test tokens. To do so, this
must be configured when initializing the wallet:

```bash
linera wallet init --with-new-chain --faucet https://faucet.{{#include ../../RELEASE_DOMAIN}}.linera.net
linera wallet init --with-new-chain --faucet https://faucet.{{#include ../../../RELEASE_DOMAIN}}.linera.net
```

This creates a new microchain on Devnet with some initial test tokens, and the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,24 @@ protocol itself, see the installation section on
This manual was tested with the following Rust toolchain:

```text
{{#include ../../linera-protocol/rust-toolchain.toml}}
{{#include ../../../linera-protocol/rust-toolchain.toml}}
```

## Installing from crates.io

You may install the Linera binaries with

```bash
cargo install --locked linera-service@{{#include ../../RELEASE_VERSION}}
cargo install --locked linera-service@{{#include ../../../RELEASE_VERSION}}
```

and use `linera-sdk` as a library for Linera Wasm applications:

```bash
cargo add linera-sdk@{{#include ../../RELEASE_VERSION}}
cargo add linera-sdk@{{#include ../../../RELEASE_VERSION}}
```

The version number `{{#include ../../RELEASE_VERSION}}` corresponds to the
The version number `{{#include ../../../RELEASE_VERSION}}` corresponds to the
current Devnet of Linera and may change frequently.

## Installing from GitHub
Expand All @@ -77,7 +77,7 @@ Download the source from [GitHub](https://github.com/linera-io/linera-protocol):
```bash
git clone https://github.com/linera-io/linera-protocol.git
cd linera-protocol
git checkout -t origin/{{#include ../../RELEASE_BRANCH}} # Current release branch
git checkout -t origin/{{#include ../../../RELEASE_BRANCH}} # Current release branch
```

To install the Linera toolchain locally from source, you may run:
Expand All @@ -93,7 +93,7 @@ This manual was tested against the following commit of the
[repository](https://github.com/linera-io/linera-protocol):

```text
{{#include ../../.git/modules/linera-protocol/HEAD}}
{{#include ../../../.git/modules/linera-protocol/HEAD}}
```

## Bash helper (optional)
Expand Down
File renamed without changes
File renamed without changes.
6 changes: 3 additions & 3 deletions src/sdk/abi.md → src/developers/sdk/abi.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The `Abi` trait combines the `ContractAbi` and `ServiceAbi` traits to include
the types that your application exports.

```rust,ignore
{{#include ../../linera-protocol/linera-base/src/abi.rs:abi}}
{{#include ../../../linera-protocol/linera-base/src/abi.rs:abi}}
```

Next, we're going to implement each of the two traits.
Expand All @@ -35,7 +35,7 @@ The `ContractAbi` trait defines the data types that your application uses in a
contract. Each type represents a specific part of the contract's behavior:

```rust,ignore
{{#include ../../linera-protocol/linera-base/src/abi.rs:contract_abi}}
{{#include ../../../linera-protocol/linera-base/src/abi.rs:contract_abi}}
```

All these types must implement the `Serialize`, `DeserializeOwned`, `Send`,
Expand All @@ -62,7 +62,7 @@ The `ServiceAbi` trait defines the types used by the service part of your
application:

```rust,ignore
{{#include ../../linera-protocol/linera-base/src/abi.rs:service_abi}}
{{#include ../../../linera-protocol/linera-base/src/abi.rs:service_abi}}
```

For our Counter example, we'll be using GraphQL to query our application so our
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/composition.md → src/developers/sdk/composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ tokens.

For the complete code please take a look at the
[`crowd-funding`](https://github.com/linera-io/linera-protocol/blob/{{#include
../../.git/modules/linera-protocol/HEAD}}/examples/crowd-funding/src/contract.rs)
../../../.git/modules/linera-protocol/HEAD}}/examples/crowd-funding/src/contract.rs)
and the
[`fungible`](https://github.com/linera-io/linera-protocol/blob/{{#include
../../.git/modules/linera-protocol/HEAD}}/examples/fungible/src/contract.rs)
../../../.git/modules/linera-protocol/HEAD}}/examples/fungible/src/contract.rs)
application contracts in the `examples` folder in `linera-protocol`.
2 changes: 1 addition & 1 deletion src/sdk/contract.md → src/developers/sdk/contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub trait Contract: WithContractAbi + ContractAbi + Sized {

The full trait definition can be found
[here](https://github.com/linera-io/linera-protocol/blob/{{#include
../../.git/modules/linera-protocol/HEAD}}/linera-sdk/src/lib.rs).
../../../.git/modules/linera-protocol/HEAD}}/linera-sdk/src/lib.rs).

There's quite a bit going on here, so let's break it down and take one method at
a time.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/sdk/deploy.md → src/developers/sdk/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ To configure the wallet for the devnet while creating a new microchain, the
following command can be used:

```bash
linera wallet init --with-new-chain --faucet https://faucet.{{#include ../../RELEASE_DOMAIN}}.linera.net
linera wallet init --with-new-chain --faucet https://faucet.{{#include ../../../RELEASE_DOMAIN}}.linera.net
```

The Faucet will provide the new chain with some tokens, which can then be used
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/sdk/messages.md → src/developers/sdk/messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ receiver rejects it. The example below enables both flags:

In the [`fungible` example
application](https://github.com/linera-io/linera-protocol/tree/{{#include
../../.git/modules/linera-protocol/HEAD}}/examples/fungible), such a message can
../../../.git/modules/linera-protocol/HEAD}}/examples/fungible), such a message can
be the transfer of tokens from one chain to another. If the sender includes a
`Transfer` operation on their chain, it decreases their account balance and
sends a `Credit` message to the recipient's chain:
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/service.md → src/developers/sdk/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub trait Service: WithServiceAbi + ServiceAbi + Sized {

The full service trait definition can be found
[here](https://github.com/linera-io/linera-protocol/blob/{{#include
../../.git/modules/linera-protocol/HEAD}}/linera-sdk/src/lib.rs).
../../../.git/modules/linera-protocol/HEAD}}/linera-sdk/src/lib.rs).

Let's implement `Service` for our counter application.

Expand Down Expand Up @@ -153,5 +153,5 @@ We haven't included the imports in the above code; they are left as an exercise
to the reader (but remember to import `async_graphql::Object`). If you want the
full source code and associated tests check out the [examples
section](https://github.com/linera-io/linera-protocol/blob/{{#include
../../.git/modules/linera-protocol/HEAD}}/examples/counter/src/service.rs) on
../../../.git/modules/linera-protocol/HEAD}}/examples/counter/src/service.rs) on
GitHub.
File renamed without changes.
File renamed without changes.
18 changes: 11 additions & 7 deletions src/introduction.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
![The Linera banner](images/Linera-Header_1920x284px.svg)
![The Linera banner](developers/images/Linera-Header_1920x284px.svg)

# The Linera Developer Manual
# The Linera Manual

Welcome to the developer manual of Linera, a decentralized protocol designed for
Welcome to the Linera manual, a decentralized protocol designed for
**highly scalable, low-latency Web3 applications**.

This documentation is intended for developers who wish to learn more about
The documentation is split in two parts:
1. The [Developers](./operators.md) section
is intended for developers who wish to learn more about
Linera and its programming model by prototyping applications on top of the
Linera Rust SDK.
Linera Rust SDK.
2. The [Operators](./operators.md) section is intended for operators
who wish to run Linera validators.

> **NEW: Publish and test your Web3 application on the Linera Devnet!**
>
> Install
> [the Linera CLI tool](getting_started/installation.html#installing-from-cratesio)
> [the Linera CLI tool](developers/getting_started/installation.html#installing-from-cratesio)
> then follow the instructions on
> [this page](getting_started/hello_linera.html#using-the-devnet) to claim a
> [this page](developers/getting_started/hello_linera.html#using-the-devnet) to claim a
> microchain and publish your first application on the current Devnet.
To join our community and get involved in the development of the Linera
Expand Down
3 changes: 3 additions & 0 deletions src/operators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Operator Manual

This section of the Linera Manual is for operators running Linera validators.
Empty file.

0 comments on commit ddfaee6

Please sign in to comment.