Skip to content

Commit

Permalink
Merge pull request #302 from 0xPolygonMiden/greenhat/fix-mkdocs-warnings
Browse files Browse the repository at this point in the history
chore: fix mkdocs warnings, move cargo-miden README to docs
  • Loading branch information
bitwalker authored Sep 5, 2024
2 parents 5c5fae4 + 33de08a commit 57e7b2e
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 44 deletions.
File renamed without changes.
File renamed without changes.
48 changes: 48 additions & 0 deletions docs/usage/cargo-miden.md
Original file line number Diff line number Diff line change
@@ -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 <command> --help
```

### Creating a new project
To create a new Miden VM project, run:

```bash
cargo miden new <project-name>
```

### 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.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
45 changes: 1 addition & 44 deletions tools/cargo-miden/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <command> --help
```

### Creating a new project
To create a new Miden VM project, run:

```bash
cargo miden new <project-name>
```

### 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.

0 comments on commit 57e7b2e

Please sign in to comment.