2 releases
new 0.1.1 | Feb 20, 2025 |
---|---|
0.1.0 | Feb 13, 2025 |
#897 in Authentication
126 downloads per month
155KB
3K
SLoC
Pubky Testnet
A local test network for developing Pubky Core or applications depending on it.
All resources are ephemeral, databases are in the operating system's temporary directories, and all servers are closed as the testnet dropped.
Usage
Inline testing
use pubky_testnet::Testnet;
#[tokio::main]
async fn main () {
// Run a new testnet.
let testnet = Testnet::run().await.unwrap();
// Optionally create and run a Homeserver.
let server = testnet.run_homeserver().await.unwrap();
// Optionally create and run an HTTP Relay.
let http_relay = testnet.run_http_relay().await.unwrap();
// Create a Pubky Client from the testnet.
let client = testnet.client_builder().build().unwrap();
}
Binary (hardcoded testnet, and browser support).
If you need to run the testnet in a separate process, for example to test Pubky Core in browsers, you need to run this binary, which will create these components with hardcoded configurations:
Dependencies
~37–52MB
~1M SLoC