Skip to content

Commit

Permalink
Update docs and build commands (#228)
Browse files Browse the repository at this point in the history
* fix readme links in repo

* fix makefile
  • Loading branch information
alexytsu committed Oct 4, 2023
1 parent a9dde51 commit 2801706
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 30 deletions.
40 changes: 17 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
WASM_EXCLUSION = \
--exclude greeter \
--exclude helix_integration_tests \
--exclude basic_token_actor \
--exclude basic_receiving_actor \
--exclude basic_nft_actor \
--exclude basic_transfer_actor \
--exclude frc46_test_actor \
--exclude frc46_factory_token \
--exclude frc53_test_actor

# actors are built to WASM via the helix_test_actors crate and be built individually as standalone
# crates so we exclude the from this convenience target
build: install-toolchain
cargo build --workspace
cargo build --workspace $(WASM_EXCLUSION)

check: install-toolchain
cargo fmt --check
cargo clippy --workspace -- -D warnings

check-build: check
cargo build --workspace
check-build: check build

# run all tests, this will not work if using RUSTFLAGS="-Zprofile" to generate profile info or coverage reports
# as any WASM targets will fail to build
Expand All @@ -16,16 +28,7 @@ test: install-toolchain
# tests excluding actors so we can generate coverage reports during CI build
# WASM targets such as actors do not support this so are excluded
test-coverage: install-toolchain
cargo test --workspace \
--exclude greeter \
--exclude helix_integration_tests \
--exclude basic_token_actor \
--exclude basic_receiving_actor \
--exclude basic_nft_actor \
--exclude basic_transfer_actor \
--exclude frc46_test_actor \
--exclude frc46_factory_token \
--exclude frc53_test_actor
cargo test --workspace $(WASM_EXCLUSION)

# separate actor testing stage to run from CI without coverage support
test-actors: install-toolchain
Expand All @@ -46,14 +49,5 @@ clean:
# install it with `cargo install grcov`
# TODO: fix the output path for LLVM_PROFILE_FILE
local-coverage:
CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='target/coverage/raw/cargo-test-%p-%m.profraw' cargo test --workspace \
--exclude greeter \
--exclude fil_token_integration_tests \
--exclude basic_token_actor \
--exclude basic_receiving_actor \
--exclude basic_nft_actor \
--exclude basic_transfer_actor \
--exclude frc46_test_actor \
--exclude frc46_factory_token \
--exclude frc53_test_actor
CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='target/coverage/raw/cargo-test-%p-%m.profraw' cargo test --workspace $(WASM_EXCLUSION)
grcov . --binary-path ./target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/html
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,33 @@ utilities to generate method numbers is also available:

Reference library for implementing a standard fungible token in native actors

| Specification | Reference Implementation | Examples |
| --------------------------------------------------------------------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [FRC-0046](https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0046.md) | [frc46_token](./frc46_token/README.md) | [basic_token](./testing/fil_token_integration/actors/basic_token_actor/README.md) [basic_receiver](./testing/fil_token_integration/actors/basic_receiving_actor/README.md) |
| Specification | Reference Implementation | Examples |
| --------------------------------------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [FRC-0046](https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0046.md) | [frc46_token](./frc46_token/README.md) | [basic_token](./testing/test_actors/actors/basic_token_actor/README.md) [basic_receiver](./testing/test_actors/actors/basic_receiving_actor/README.md) |

### frc53_nft

Reference library for implementing a standard non-fungible token in native
actors

| Specification | Reference Implementation | Examples |
| --------------------------------------------------------------------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [FRC-0053](https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0053.md) | [frc53_nft](./frc53_nft/README.md) | [basic_nft](./testing/fil_token_integration/actors/basic_nft_actor/README.md) [basic_receiver](./testing/fil_token_integration/actors/basic_receiving_actor/README.md) |
| Specification | Reference Implementation | Examples |
| --------------------------------------------------------------------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| [FRC-0053](https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0053.md) | [frc53_nft](./frc53_nft/README.md) | [basic_nft](./testing/test_actors/actors/basic_nft_actor/README.md) [basic_receiver](./testing/test_actors/actors/basic_receiving_actor/README.md) |

### frc46_factory_token

A configurable actor that can be used as a factory to implement [FRC-0046](https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0046.md) tokens, based on [frc46_token](./frc46_token/README.md)
A configurable actor that can be used as a factory to create instances of
[FRC-0046](https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0046.md)-compatible
tokens, based on [frc46_token](./frc46_token/README.md) and implemented
[here](./testing/test_actors/actors/frc46_factory_token/)

## License

Dual-licensed: [MIT](./LICENSE-MIT),
[Apache Software License v2](./LICENSE-APACHE).

## Testing

For local coverage testing, please install the `grcov` crate.

<sub>Copyright Protocol Labs, Inc, 2022</sub>

0 comments on commit 2801706

Please sign in to comment.