Skip to content

Latest commit

 

History

History
 
 

rust

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Sui Custom Indexer Example

This is a complimentary 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.

Prerequisites

  • Rust

How to install

Once you have Rust installed, you can build the custom indexer by running the following command:

cargo build

How to run

Remote Reader example

cargo run --bin remote_reader

Local Reader example

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/