Skip to content

Commit

Permalink
Rename folder lib/ to packages/
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Mar 20, 2020
1 parent f13b5ca commit fbdbe59
Show file tree
Hide file tree
Showing 48 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
- cargocache-std-rust:1.40.0-{{ checksum "Cargo.lock" }}
- run:
name: Build standard library
working_directory: ~/project/lib/std
working_directory: ~/project/packages/std
command: cargo build --locked
- run:
name: Run standard library tests
working_directory: ~/project/lib/std
working_directory: ~/project/packages/std
command: cargo test --locked
- save_cache:
paths:
Expand All @@ -58,11 +58,11 @@ jobs:
- cargocache-singlepass-rust:nightly-{{ checksum "Cargo.lock" }}
- run:
name: Build all targets (including workspaces)
working_directory: ~/project/lib/vm
working_directory: ~/project/packages/vm
command: cargo build --locked
- run:
name: Run all tests (including workspaces)
working_directory: ~/project/lib/vm
working_directory: ~/project/packages/vm
command: cargo test --locked
- save_cache:
paths:
Expand All @@ -88,11 +88,11 @@ jobs:
- cargocache-cranelift-rust:1.40.0-{{ checksum "Cargo.lock" }}
- run:
name: Build all targets (including workspaces)
working_directory: ~/project/lib/vm
working_directory: ~/project/packages/vm
command: cargo build --locked --no-default-features --features default-cranelift
- run:
name: Run all tests (including workspaces)
working_directory: ~/project/lib/vm
working_directory: ~/project/packages/vm
command: cargo test --locked --no-default-features --features default-cranelift
- save_cache:
paths:
Expand Down Expand Up @@ -236,11 +236,11 @@ jobs:
command: rustup component add clippy
- run:
name: Clippy linting on std
working_directory: ~/project/lib/std
working_directory: ~/project/packages/std
command: cargo clippy -- -D warnings
- run:
name: Clippy linting on vm (use flags for Rust stable support)
working_directory: ~/project/lib/vm
working_directory: ~/project/packages/vm
command: cargo clippy --no-default-features --features default-cranelift
- run:
name: Clippy linting on hackatom
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
members = [
"lib/std",
"lib/vm",
"packages/std",
"packages/vm",
]
exclude = ["contracts"]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ around 40% of the code size.

**Executing contracts:**

* [cosmwasm-vm](https://github.com/CosmWasm/cosmwasm/tree/master/lib/vm) - A sub-crate. Uses the [wasmer](https://github.com/wasmerio/wasmer) engine
to execute a given smart contract. Also contains code for gas metering, storing, and caching wasm artifacts. Read more [here](lib/vm/README.md).
* [cosmwasm-vm](https://github.com/CosmWasm/cosmwasm/tree/master/packages/vm) - A sub-crate. Uses the [wasmer](https://github.com/wasmerio/wasmer) engine
to execute a given smart contract. Also contains code for gas metering, storing, and caching wasm artifacts. Read more [here](packages/vm/README.md).
* [go-cosmwasm](https://github.com/CosmWasm/go-cosmwasm) - High-level go bindings to all the power inside `cosmwasm-vm`. Easily allows you to upload, instantiate and execute contracts,
making use of all the optimizations and caching available inside `cosmwasm-vm`.
* [wasmd](https://github.com/CosmWasm/wasmd) - A basic Cosmos SDK app to host WebAssembly smart contracts.
Expand Down Expand Up @@ -180,7 +180,7 @@ You may also want to ensure the compiled contract interacts with the environment
properly. To do so, you will want to create a canonical release build of
the `<contract>.wasm` file and then write tests in with the
same VM tooling we will use in production. This is a bit more complicated but
we added some tools to help in [cosmwasm-vm](https://github.com/CosmWasm/cosmwasm/tree/master/lib/vm)
we added some tools to help in [cosmwasm-vm](https://github.com/CosmWasm/cosmwasm/tree/master/packages/vm)
which can be added as a `dev-dependency`.

You will need to first compile the contract using `cargo wasm`,
Expand Down
4 changes: 2 additions & 2 deletions contracts/hackatom/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ cranelift = ["cosmwasm-vm/default-cranelift"]
singlepass = ["cosmwasm-vm/default-singlepass"]

[dependencies]
cosmwasm = { path = "../../lib/std", version = "0.7.1" }
cosmwasm = { path = "../../packages/std", version = "0.7.1" }
schemars = "0.5"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
snafu = { version = "0.5.0", default-features = false, features = ["rust_1_30"] }

[dev-dependencies]
cosmwasm-vm = { path = "../../lib/vm", version = "0.7.1", default-features = false }
cosmwasm-vm = { path = "../../packages/vm", version = "0.7.1", default-features = false }
serde_json = "1.0"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/vm/Cargo.toml → packages/vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.7.1"
authors = ["Ethan Frey <ethanfrey@users.noreply.github.com>"]
edition = "2018"
description = "VM bindings to run cosmwams contracts"
repository = "https://github.com/CosmWasm/cosmwasm/tree/master/lib/vm"
repository = "https://github.com/CosmWasm/cosmwasm/tree/master/packages/vm"
license = "Apache-2.0"

[badges]
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions lib/vm/README.md → packages/vm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ docker run --rm -v "$(pwd)":/code \
--mount type=volume,source=$(basename "$(pwd)")_cache,target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
confio/cosmwasm-opt:0.7.2 ./contracts/hackatom
cp contracts/hackatom/contract.wasm lib/vm/testdata/contract_0.7.wasm
cp contracts/hackatom/contract.wasm packages/vm/testdata/contract_0.7.wasm
```

## Testing
Expand All @@ -28,13 +28,13 @@ By default, this repository is built and tested with the singlepass backend. Thi
requires running Rust nighty:

```sh
cd lib/vm
cd packages/vm
cargo +nightly test
```

To test with Rust stable, you need to switch to cranelift:

```sh
cd lib/vm
cd packages/vm
cargo test --no-default-features --features default-cranelift
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit fbdbe59

Please sign in to comment.