Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions pdl-live-react/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ edition = "2024"
name = "tauri_app_lib"
crate-type = ["staticlib", "cdylib", "rlib"]

[features]
interpreter = ["dep:rustpython-vm", "dep:rustpython-stdlib", "dep:rustpython-pylib"]

[build-dependencies]
tauri-build = { version = "2", features = [] }

Expand All @@ -37,13 +40,13 @@ serde_norway = "0.9.42"
minijinja = { version = "2.9.0", features = ["custom_syntax"] }
ollama-rs = { version = "0.3.1", features = ["stream"] }
owo-colors = "4.2.0"
rustpython-vm = { git="https://github.com/RustPython/RustPython.git", features= ["importlib", "threading", "encodings"] } # "0.4.0"
rustpython-vm = { git="https://github.com/RustPython/RustPython.git", features= ["importlib", "threading", "encodings"], optional = true } # "0.4.0"
async-recursion = "1.1.1"
tokio-stream = "0.1.17"
tokio = { version = "1.44.1", features = ["io-std"] }
indexmap = { version = "2.9.0", features = ["serde"] }
rustpython-stdlib = { git="https://github.com/RustPython/RustPython.git", features = ["ssl-vendor"] } # 0.4.0
rustpython-pylib = { git="https://github.com/RustPython/RustPython.git", features = ["freeze-stdlib"] } # 0.4.0
rustpython-stdlib = { git="https://github.com/RustPython/RustPython.git", features = ["ssl-vendor"], optional = true } # 0.4.0
rustpython-pylib = { git="https://github.com/RustPython/RustPython.git", features = ["freeze-stdlib"], optional = true } # 0.4.0
schemars = "0.8.22"
fs4 = "0.13.1"
derive_builder = "0.20.2"
Expand Down
2 changes: 2 additions & 0 deletions pdl-live-react/src-tauri/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use urlencoding::encode;

use crate::compile;
use crate::gui::new_window;
#[cfg(feature = "interpreter")]
use crate::pdl::interpreter::{RunOptions, load_scope, run_file_sync};

#[cfg(desktop)]
Expand Down Expand Up @@ -49,6 +50,7 @@ pub fn setup(app: &mut tauri::App) -> Result<bool, Box<dyn ::std::error::Error>>
_ => Err(Box::from("Unsupported compile command")),
}
}
#[cfg(feature = "interpreter")]
"run" => run_file_sync(
subcommand_args
.get("source")
Expand Down
2 changes: 2 additions & 0 deletions pdl-live-react/src-tauri/src/commands/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#[cfg(feature = "interpreter")]
pub mod interpreter;

pub mod read_trace;
pub mod replay_prep;
1 change: 1 addition & 0 deletions pdl-live-react/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub fn run() {
.invoke_handler(tauri::generate_handler![
commands::read_trace::read_trace,
commands::replay_prep::replay_prep,
#[cfg(feature = "interpreter")]
commands::interpreter::run_pdl_program,
])
.run(tauri::generate_context!())
Expand Down
2 changes: 2 additions & 0 deletions pdl-live-react/src-tauri/src/pdl/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
pub mod ast;
pub mod extract;
#[cfg(feature = "interpreter")]
pub mod interpreter;
#[cfg(feature = "interpreter")]
mod interpreter_tests;
pub mod pip;
pub mod pull;
Expand Down
Loading