Skip to content

Commit

Permalink
doc: include README as module doc (#854)
Browse files Browse the repository at this point in the history
  • Loading branch information
huitseeker authored Nov 6, 2023
1 parent ef96d64 commit 57a50c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Please note that the Lurk language and spec will be versioned independently from
Lurk source files used in tests are in the [lurk-lib](https://github.com/lurk-lab/lurk-lib) submodule. You must
initialize and update submodules before test will pass:

```
```ignore
git submodule update --init --recursive
```

Expand All @@ -70,32 +70,32 @@ git submodule update --init --recursive
- [clang](https://clang.llvm.org/get_started.html)

Lurk can be compiled to Wasm with
```
```ignore
cargo build --target wasm32-unknown-unknown
```

If using Nix without a system-wide `clang` install (e.g. NixOS):
```
```ignore
CC=clang cargo build --target wasm32-unknown-unknown
```

## Repl

```
```ignore
cargo run --release
```

Or use the wrapper script:

```
```ignore
bin/lurk
```

Set the environment variable `LURK_FIELD` to specify the scalar field of the Lurk language instance:
- `LURK_FIELD=PALLAS` (default): scalar field of Pallas
- `LURK_FIELD=VESTA`: scalar field of Vesta

```
```ignore
➜ lurk-rs ✗ bin/lurk
Finished release [optimized] target(s) in 0.06s
Running `target/release/lurk`
Expand All @@ -106,7 +106,7 @@ Lurk REPL welcomes you.
```

Or enable `info` log-level for a trace of reduction frames:
```
```ignore
➜ lurk-rs ✗ RUST_LOG=info bin/lurk
Finished release [optimized] target(s) in 0.05s
Running `target/release/lurk`
Expand Down Expand Up @@ -159,26 +159,26 @@ Lurk REPL welcomes you.
## Install

You can install the `lurk` Repl on your machine with
```
```ignore
$ cargo install --path .
```

## Nix

Install [Nix](https://nixos.org) and [enable Nix flakes](https://nixos.wiki/wiki/Flakes). Then, you can enter into a Nix devshell with the appropriate dependencies for Lurk with

```
```ignore
$ nix develop
```
or

```
```ignore
$ direnv allow
```

And then build with Cargo as usual:

```
```ignore
$ cargo build
```

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]

Check warning on line 1 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Generate crate documentation

could not parse code block as Rust code
#![deny(unreachable_pub)]

#[macro_use]
Expand Down

0 comments on commit 57a50c9

Please sign in to comment.