flâneur

Overview of Basic Usage – OpenVM

docs.openvm.dev · 888 words · saved by 1 readers

The first step to using OpenVM is to write a Rust program that can be executed by an OpenVM virtual machine. Writing a program for OpenVM is very similar to writing a standard Rust program, with a few key differences necessary to support the OpenVM environment. For more detailed information about writing programs, see the Writing a Program guide. At this point, you should have a guest program with a Cargo.toml file in the root of your project directory. What's next? The first thing you will want to do is build and transpile your program using the following command: By default this will build the project located in the current directory. To execute the program, you can run the following command: Note if your program doesn't require inputs, you can omit the --input flag. For more information see the build and run docs. The --input field needs to either be a single hex string or a file path to a json file that contains the key input and an array of hex strings. Also note that if you need

Writing a Program The first step to using OpenVM is to write a Rust program that can be executed by an OpenVM virtual machine. Writing a program for OpenVM is very similar to writing a standard Rust program, with a few key differences necessary to support the OpenVM environment. For more detailed information about writing programs, see the Writing a Program guide. Building and Transpiling a Program At this point, you should have a guest program with a Cargo.toml file in the root of your project directory. What's next? The first thing you will want to do is build and transpile your program usin

related reading