sway/templates/sway-script-test-rs/README.md
Call Delegation e40daf79b4
feat: Add predicate and script templates (#5238)
## Description

When DevRel creates more tutorials on predicates and scripts, it's not
ideal to use the same template designed for contracts and ask developers
to erase everything and start afresh. It's clearer to have developers
use a template tailored for the respective program type.

These templates are already compatible with existing `forc` commands
like

Predicate
1. `forc new --predicate MyPredicate`
2. `cargo generate --init fuellabs/sway templates/sway-predicate-test-rs
--name MyPredicate`

Script
1. `forc new --script MyScript`
2. `cargo generate --init fuellabs/sway templates/sway-script-test-rs
--name MyScript`

## Checklist

- [x] I have linked to any relevant issues.
- [x] I have commented my code, particularly in hard-to-understand
areas.
- [x] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: IGI-111 <igi-111@protonmail.com>
Co-authored-by: Sophie Dankel <47993817+sdankel@users.noreply.github.com>
2024-03-20 09:54:08 +11:00

479 B

Rust + Sway integration testing

A cargo-generate template that makes it easy to initialise Rust integration testing within an existing Sway project.

This template is designed for Rust developers who wish to test integration of their Rust application and Sway code.

See the Testing with Rust chapter of the Sway Book for a thorough guide on how to use this template.