examples/custom-indexer/rust/README.md
This is a complementary example to the Sui Custom Indexer documentation. It demonstrates how to create a custom indexer for the Sui search engine. See the Sui Custom Indexer documentation for more information.
Once you have Rust installed, you can build the custom indexer by running the following command:
cargo build
cargo run --bin remote_reader
The local reader example saves progress in a file called /tmp/local_reader_progress and monitors checkpoint files in the chk directory
To test the local reader example, create the /tmp/local_reader_progress file first
echo "{\"local_reader\": 1}" > /tmp/local_reader_progress
then, create the chk directory in the same level as the local_reader.rs file
mkdir -p chk
then, run the local reader example
cargo run --bin local_reader
Finally, copy the checkpoint files to the chk directory and the program should process the checkpoint files as they come in
cp $YOUR_CHECKPOINT_FILE chk/