Log trace of exection trace engine
Follow these instructions to get the project up and running on your local machine.
Make sure you have the following installed:
- Git
- wasm-pack
- [Your preferred method to serve HTML locally (e.g., Live Server extension for VS Code)]
# Clone the repository
git clone https://github.com/Forpee/zkEngine
# Navigate into the project directory
cd zkEngine
# Initialize and update the submodule
git submodule init
git submodule update
# Build the project with wasm-pack
wasm-pack build --target web-
Open
index.htmlwith your preferred method to serve HTML locally. If you're using VS Code, you can use the Live Server extension. -
Enter the functions name in the "Function Name" input.
-
Enter the function's arguments separated by commas. For example, if your function is
addand is typically called likeadd(2, 4), you would input2,4in the input (only i32 args are accepted for now).
4.Then Enter the function's argument types separated by commas. For example, if your function is add and is typically called like add(2: i32, 4.0: f32), you would input i32,f32 in the input. (no spaces between values)
- Click the "Choose File" button/input. Do this last as it triggers the
onchangefunction. If you select a file first without entering the function name and arguments, it won't run.
Once the file is selected, you should see the execution trace of that WebAssembly (Wasm) file in the console.
In the test folder, you'll find examples wasm files. You can inspect what the wat looks like at wasm2wat to see the function argumets to input. Here are example inputs for the provided wasm files:
- Function Name: 'add'
- Arguments: 2,4
- Argument types: i32,i32
- Selected File: add.wasm
- Function Name: 'fibonacci'
- Arguments: 10
- Argument types: i32
- Selected File: fibonacci.wasm
- Function Name: 'addi32_and_f32'
- Arguments: 10,90.202
- Argument types: i32,f32
- Selected File: addi32_and_f32.wasm