- ddex_schema - core of the project, it has all structs needed to deserialize xml
- yaserde & yaserde_derive - dependencies of
ddex_schema
that were customized to support regex validation - validation_generator - generator used to generate... validation out of xml. Uses ts.
- resources - sample ddex messages along with ern xml schema (stripped from descriptions and flattened)
- runner - binary file to play around with the parser.
- Clone repo
cd parser
- To run with CPU:
cargo run --release
- To run with GPU:
cargo run --release -F cuda
Running on GPU requires a GPU with a lot of memory. We have tested it working on Nvidia cards with 8GB of RAM, but the more you have the better
On line 23 of /prover/host/src/main.rs
you have the value .segment_limit_po2(19)
, which should work for cards with 8GB of RAM. For higher end cards (24GB) you can comment to entire line to improve performance. you can slighty modify this value to the maximum value that you system supports.
To run on GPU you might need to set these values first:
NVCC_APPEND_FLAGS='--gpu-architecture=compute_86 --gpu-code=compute_86,sm_86 --generate-code arch=compute_86,code=sm_86'
- core - shared interface between guest and host
- host - 'main' code that is run by hardware. It creates environment for guest code to be proven and consists of logic what to do with generated receipt.
- methods - in short, it consists guest code that is proven. Host 'records' execution of guest code. This is where xml parsing happends
To run risc0 additional resources are required. Full installation guide can be found at https://dev.risczero.com/api/zkvm/install