docs/src/connecting/short-lived.md
You can use the SDK to spin up a local, ideally short-lived Fuel node. Then, you can instantiate a Fuel client, pointing to this node.
{{#include ../../../examples/contracts/src/lib.rs:instantiate_client}}
This approach is ideal for contract testing.
You can also use the test helper setup_test_provider() for this:
{{#include ../../../examples/wallets/src/lib.rs:create_random_wallet}}
You can also use launch_provider_and_get_wallet(), which abstracts away the setup_test_provider() and the wallet creation, all in one single method:
let wallet = launch_provider_and_get_wallet().await?;
The fuel-core-lib feature allows us to run a fuel-core node without installing the fuel-core binary on the local machine. Using the fuel-core-lib feature flag entails downloading all the dependencies needed to run the fuel-core node.
fuels = { version = "0.77.0", features = ["fuel-core-lib"] }
The rocksdb is an additional feature that, when combined with fuel-core-lib, provides persistent storage capabilities while using fuel-core as a library.
fuels = { version = "0.77.0", features = ["rocksdb"] }