Skip to content

Commit

Permalink
Feature: specify fact topologies file for the bootloader (#8)
Browse files Browse the repository at this point in the history
Problem: the fact topologies output file is hardcoded to
`/tmp/fact_topologies.json`. Users may want to place it in another place
or not generate it at all.

Solution: let the user specify the path.
  • Loading branch information
odesenfans authored Feb 29, 2024
1 parent 64120b4 commit 9b310ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cairo_vm.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::any::Any;
use std::collections::HashMap;
use std::path::PathBuf;

use cairo_vm::air_private_input::AirPrivateInput;
use cairo_vm::air_public_input::PublicInputError;
Expand Down Expand Up @@ -219,6 +220,7 @@ pub fn run_bootloader_in_proof_mode(
tasks: Vec<TaskSpec>,
layout: Option<Layout>,
allow_missing_builtins: Option<bool>,
fact_topologies_path: Option<PathBuf>,
) -> Result<ExecutionArtifacts, ExecutionError> {
let proof_mode = true;
let layout = layout.unwrap_or(Layout::StarknetWithKeccak);
Expand All @@ -238,7 +240,7 @@ pub fn run_bootloader_in_proof_mode(

let bootloader_input = BootloaderInput {
simple_bootloader_input: SimpleBootloaderInput {
fact_topologies_path: Some("/tmp/fact_topologies".into()),
fact_topologies_path,
single_page: false,
tasks,
},
Expand Down

0 comments on commit 9b310ed

Please sign in to comment.