Skip to content

Commit

Permalink
Update the README.md and specifying the rust toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
wangeguo committed Jan 10, 2024
1 parent 2714b8e commit 3662eac
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,64 @@ const startDisassembleTask = async (app: HTMLDivElement) => {
const app = document.querySelector<HTMLDivElement>('#app')!
startDisassembleTask(app)
```

## Supported Rust Versions

`@aptos/move-js` supports the version of Rust (toolchain and targets) specified
in [`rust-toolchain.toml`](rust-toolchain.toml). At the time of writing, we are
using version 1.77.0. However, this can change at any time if one of our
dependencies changes MSRV or through a new patch version.

## Building from source

Note: You will need rust installed also for this. https://www.rust-lang.org/tools/install or

```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

Then get `@aptos/move-js` source:

```
git clone https://github.com/movefuns/move-js
cd move-js
git checkout aptos
```

Build the source

```
yarn install
yarn build
```

## Testing

### Build and test the example program

[my-counter](/examples/my-counter/) (Compiling move package into blob)

```
cd example/my-counter/
yarn install
yarn dev
```

[disassemble](/examples/disassemble/) (Disassemble contract from bytecode)

```
cd example/disassemble
yarn install
yarn dev
```

### Unit test

```
yarn test
```

## License

Licensed under the Apache License, Version 2.0,
see the [LICENSE](LICENSE) file for more information.
3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "nightly-2024-01-10"
targets = ["wasm32-wasi"]

0 comments on commit 3662eac

Please sign in to comment.