Skip to content

Commit

Permalink
Stop using cargo rdme to generate README files in examples (#3112)
Browse files Browse the repository at this point in the history
## Motivation

This complicates things. Also `lib.rs` is not even the main file of the
applications.

## Proposal

* Stop using `cargo rdme` to generate README files in examples
* Deactivate the correspondign test in CI
* Fix the title depths for github markdown

## Test Plan

* CI
* check rendering of markdown in the github branch
  • Loading branch information
ma2bd authored Jan 10, 2025
1 parent f74b6ae commit 1c8a710
Show file tree
Hide file tree
Showing 25 changed files with 83 additions and 2,261 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,6 @@ jobs:
- name: Check for outdated README.md
run: |
(set -e; for I in linera-*; do if [ -d "$I" ]; then echo $I; cargo rdme --check --no-fail-on-warnings -w $I; fi; done)
(set -e; cd examples; for dir in */; do
if [ -f "${dir}README.md" ] && grep -q "<!-- cargo-rdme start -->" "${dir}README.md"; then
dir_name="${dir%/}"
echo "${dir_name}"
cargo rdme --check --no-fail-on-warnings -w "${dir_name}"
fi
done)
lint-wasm-applications:
runs-on: ubuntu-latest
Expand Down
16 changes: 6 additions & 10 deletions examples/amm/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<!-- cargo-rdme start -->

# Automated Market Maker (AMM) Example Application

This example implements an Automated Market Maker (AMM) which demonstrates DeFi capabilities of the
Linera protocol. Prerequisite for the AMM application is the `fungible` application, as we will
be adding/removing liquidity and also performing a swap.

# How it works
## How it works

It supports the following operations. All operations need to be executed remotely.

Expand All @@ -25,9 +23,9 @@ It supports the following operations. All operations need to be executed remotel
the amounts from both tokens as a removal of liquidity. The owner, in this context, is the user
removing liquidity, which currently can only be a chain owner.

# Usage
## Usage

## Setting Up
### Setting Up

Before getting started, make sure that the binary tools `linera*` corresponding to
your version of `linera-sdk` are in your PATH. For scripting purposes, we also assume
Expand Down Expand Up @@ -86,7 +84,7 @@ AMM_APPLICATION_ID=$(linera --wait-for-outgoing-messages \
--required-application-ids $FUN1_APP_ID $FUN2_APP_ID)
```

## Using the AMM Application
### Using the AMM Application

First, a node service for the current wallet has to be started:

Expand All @@ -95,7 +93,7 @@ PORT=8080
linera service --port $PORT &
```

### Using GraphiQL
#### Using GraphiQL

Type each of these in the GraphiQL interface and substitute the env variables with their actual
values that we've defined above.
Expand Down Expand Up @@ -246,7 +244,7 @@ mutation {
}
```

### Atomic Swaps
#### Atomic Swaps

In general, if you send tokens to a chain owned by someone else, you rely on them
for asset availability: If they don't handle your messages, you don't have access to
Expand Down Expand Up @@ -323,5 +321,3 @@ query {
}
}
```

<!-- cargo-rdme end -->
Loading

0 comments on commit 1c8a710

Please sign in to comment.