From 33de08a1967ca5c46a27f62d8b83a8bcb743cee4 Mon Sep 17 00:00:00 2001 From: Denys Zadorozhnyi Date: Thu, 5 Sep 2024 18:30:58 +0300 Subject: [PATCH] chore: fix mkdocs warnings, move cargo-miden README to docs. --- docs/{README.md => README.txt} | 0 .../canonabi-adhocabi-mismatch.md | 0 docs/usage/cargo-miden.md | 48 +++++++++++++++++++ mkdocs.yml | 1 + tools/cargo-miden/README.md | 45 +---------------- 5 files changed, 50 insertions(+), 44 deletions(-) rename docs/{README.md => README.txt} (100%) rename docs/{ => appendix}/canonabi-adhocabi-mismatch.md (100%) create mode 100644 docs/usage/cargo-miden.md diff --git a/docs/README.md b/docs/README.txt similarity index 100% rename from docs/README.md rename to docs/README.txt diff --git a/docs/canonabi-adhocabi-mismatch.md b/docs/appendix/canonabi-adhocabi-mismatch.md similarity index 100% rename from docs/canonabi-adhocabi-mismatch.md rename to docs/appendix/canonabi-adhocabi-mismatch.md diff --git a/docs/usage/cargo-miden.md b/docs/usage/cargo-miden.md new file mode 100644 index 000000000..ba0ce6223 --- /dev/null +++ b/docs/usage/cargo-miden.md @@ -0,0 +1,48 @@ +# Miden Cargo Extension + +`cargo-miden` crate provides a cargo extension that allows you to compile Rust code to Miden VM MASM. + +## Installation + +In order to install(build) the extension, you need to have the nightly Rust toolchain installed: + +```bash +rustup toolchain install nightly-2024-05-07 +``` + +To install the extension, run: + +```bash +cargo +nightly-2024-05-07 install cargo-miden +``` + +## Usage + +### Getting help +To get help with the extension, run: + +```bash +cargo miden +``` + +Or for help with a specific command: + +```bash +cargo miden --help +``` + +### Creating a new project +To create a new Miden VM project, run: + +```bash +cargo miden new +``` + +### Compiling a project +To compile a Rust crate to Miden VM MASM, run: + +```bash +cargo miden build +``` + +Without any additional arguments, this will compile the library target in the target directory in the `miden` folder. diff --git a/mkdocs.yml b/mkdocs.yml index 575c95d49..8d9b32aa2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -38,6 +38,7 @@ nav: #- Testing: - Appendices: - Calling Conventions: appendix/calling_conventions.md + - Canonical ABI vs Miden ABI: appendix/canonabi-adhocabi-mismatch.md markdown_extensions: - toc: diff --git a/tools/cargo-miden/README.md b/tools/cargo-miden/README.md index ebac7fab8..7dd839385 100644 --- a/tools/cargo-miden/README.md +++ b/tools/cargo-miden/README.md @@ -2,47 +2,4 @@ This crate provides a cargo extension that allows you to compile Rust code to Miden VM MASM. -## Installation - -In order to install(build) the extension, you need to have the nightly Rust toolchain installed: - -```bash -rustup toolchain install nightly-2024-05-07 -``` - -To install the extension, run: - -```bash -cargo +nightly-2024-05-07 install cargo-miden -``` - -## Usage - -### Getting help -To get help with the extension, run: - -```bash -cargo miden -``` - -Or for help with a specific command: - -```bash -cargo miden --help -``` - -### Creating a new project -To create a new Miden VM project, run: - -```bash -cargo miden new -``` - -### Compiling a project -To compile a Rust crate to Miden VM MASM, run: - -```bash -cargo miden build -``` - -Without any additional arguments, this will compile the library target in the target directory in the `miden` folder. +See the [documentation](/docs/usage/cargo-miden.md) for more details. \ No newline at end of file