repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/task/deps.rs | src/task/deps.rs | use crate::task::Task;
use crate::{config::Config, task::task_list::resolve_depends};
use itertools::Itertools;
use petgraph::Direction;
use petgraph::graph::DiGraph;
use std::{
collections::{HashMap, HashSet},
sync::Arc,
};
use tokio::sync::mpsc;
#[derive(Debug, Clone)]
pub struct Deps {
pub graph: DiGrap... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/task/task_results_display.rs | src/task/task_results_display.rs | use crate::exit;
use crate::task::task_output::TaskOutput;
use crate::task::task_output_handler::OutputHandler;
use crate::task::{FailedTasks, Task};
use crate::ui::{style, time};
/// Handles display of task execution results and failure summaries
pub struct TaskResultsDisplay {
output_handler: OutputHandler,
... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/task/task_dep.rs | src/task/task_dep.rs | use crate::config::config_file::toml::deserialize_arr;
use serde::ser::SerializeSeq;
use serde::{Deserialize, Deserializer, Serialize};
use std::fmt;
use std::fmt::{Display, Formatter};
use std::str::FromStr;
#[derive(Debug, Clone, Eq, PartialEq)]
pub struct TaskDep {
pub task: String,
pub args: Vec<String>,
}... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/task/mod.rs | src/task/mod.rs | use crate::cli::version::VERSION;
use crate::config::config_file::mise_toml::EnvList;
use crate::config::config_file::toml::{TomlParser, deserialize_arr};
use crate::config::env_directive::{EnvDirective, EnvResolveOptions, EnvResults, ToolsFilter};
use crate::config::{self, Config};
use crate::path_env::PathEnv;
use cr... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | true |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/task/task_fetcher.rs | src/task/task_fetcher.rs | use crate::config::Settings;
use crate::task::Task;
use crate::task::task_file_providers::TaskFileProvidersBuilder;
use eyre::{Result, bail};
/// Handles fetching remote task files and converting them to local paths
pub struct TaskFetcher {
no_cache: bool,
}
impl TaskFetcher {
pub fn new(no_cache: bool) -> Se... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/task/task_executor.rs | src/task/task_executor.rs | use crate::cli::args::ToolArg;
use crate::cmd::CmdLineRunner;
use crate::config::{Config, Settings, env_directive::EnvDirective};
use crate::file::{display_path, is_executable};
use crate::task::task_context_builder::TaskContextBuilder;
use crate::task::task_list::split_task_spec;
use crate::task::task_output::{TaskOut... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/task/task_sources.rs | src/task/task_sources.rs | use crate::dirs;
use crate::task::Task;
use serde::ser::{SerializeMap, SerializeSeq};
use serde::{Deserialize, Deserializer, Serialize};
use std::hash::{DefaultHasher, Hash, Hasher};
#[derive(Debug, Clone, Eq, PartialEq, strum::EnumIs)]
pub enum TaskOutputs {
Files(Vec<String>),
Auto,
}
impl Default for TaskO... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/task/task_tool_installer.rs | src/task/task_tool_installer.rs | use crate::cli::args::ToolArg;
use crate::config::{Config, Settings};
use crate::task::Deps;
use crate::task::task_context_builder::TaskContextBuilder;
use crate::task::task_helpers::canonicalize_path;
use crate::toolset::{InstallOptions, ToolSource, Toolset};
use eyre::Result;
use std::sync::Arc;
/// Handles collecti... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/task/task_file_providers/remote_task_http.rs | src/task/task_file_providers/remote_task_http.rs | use std::path::PathBuf;
use async_trait::async_trait;
use crate::{Result, dirs, env, file, hash, http::HTTP};
use super::TaskFileProvider;
#[derive(Debug)]
pub struct RemoteTaskHttpBuilder {
store_path: PathBuf,
use_cache: bool,
}
impl RemoteTaskHttpBuilder {
pub fn new() -> Self {
Self {
... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/task/task_file_providers/remote_task_git.rs | src/task/task_file_providers/remote_task_git.rs | use crate::Result;
use std::path::PathBuf;
use async_trait::async_trait;
use eyre::eyre;
use regex::Regex;
use crate::{
dirs, env,
git::{self, CloneOptions},
hash,
};
use super::TaskFileProvider;
#[derive(Debug)]
pub struct RemoteTaskGitBuilder {
store_path: PathBuf,
use_cache: bool,
}
impl Rem... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/task/task_file_providers/local_task.rs | src/task/task_file_providers/local_task.rs | use std::path::{Path, PathBuf};
use async_trait::async_trait;
use crate::Result;
use super::TaskFileProvider;
#[derive(Debug)]
pub struct LocalTask;
#[async_trait]
impl TaskFileProvider for LocalTask {
fn is_match(&self, file: &str) -> bool {
let path = Path::new(file);
path.is_relative() || p... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/task/task_file_providers/mod.rs | src/task/task_file_providers/mod.rs | use std::{fmt::Debug, path::PathBuf};
mod local_task;
mod remote_task_git;
mod remote_task_http;
use crate::Result;
use async_trait::async_trait;
use local_task::LocalTask;
use remote_task_git::RemoteTaskGitBuilder;
use remote_task_http::RemoteTaskHttpBuilder;
#[async_trait]
pub trait TaskFileProvider: Debug {
fn... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/ui/theme.rs | src/ui/theme.rs | use demand::Theme;
use crate::config::Settings;
/// Returns the demand theme based on the `color_theme` setting.
///
/// Available themes:
/// - "default" or "charm" - Default charm theme (good for dark terminals)
/// - "base16" - Base16 theme (good for light terminals)
/// - "catppuccin" - Catppuccin theme
/// - "dr... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/ui/time.rs | src/ui/time.rs | use std::time::Duration;
pub fn format_duration(dur: Duration) -> String {
if dur < Duration::from_millis(1) {
format!("{dur:.0?}")
} else if dur < Duration::from_secs(1) {
format!("{dur:.1?}")
} else {
format!("{dur:.2?}")
}
}
| rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/ui/table.rs | src/ui/table.rs | use crate::Result;
use crate::env::TERM_WIDTH;
use comfy_table::{Attribute, Cell, Color, ContentArrangement, Row};
use console::style;
use itertools::Itertools;
use tabled::Table;
use tabled::settings::object::{Columns, Rows};
use tabled::settings::peaker::PriorityMax;
use tabled::settings::width::{MinWidth, Wrap};
use... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/ui/info.rs | src/ui/info.rs | use crate::file;
use console::style;
use indenter::indented;
use std::fmt::{Display, Write};
pub fn section<S: Display>(header: &str, body: S) -> eyre::Result<()> {
let body = file::replace_paths_in_string(body);
let out = format!("\n{}: \n{}", style(header).bold(), indent_by(body, " "));
miseprintln!("{}... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/ui/multi_progress_report.rs | src/ui/multi_progress_report.rs | use std::collections::HashMap;
use std::sync::{Arc, Mutex};
use indicatif::{MultiProgress, ProgressBar};
use crate::cli::version::VERSION_PLAIN;
use crate::config::Settings;
use crate::ui::osc::{self, ProgressState};
use crate::ui::progress_report::{ProgressReport, QuietReport, SingleReport, VerboseReport};
use crate... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/ui/tree.rs | src/ui/tree.rs | use std::borrow::Cow;
pub trait TreeItem: Clone {
type Child: TreeItem;
fn write_self(&self) -> std::io::Result<()>;
fn children(&self) -> Cow<'_, [Self::Child]>;
}
struct TreeItemIndentChars {
/// Character for pointing down and right (`├`).
pub down_and_right: &'static str,
/// Character f... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/ui/progress_report.rs | src/ui/progress_report.rs | #![allow(unknown_lints)]
#![allow(clippy::literal_string_with_formatting_args)]
use std::time::Duration;
use std::{
fmt::{Display, Formatter},
sync::Mutex,
};
use indicatif::{ProgressBar, ProgressStyle};
use std::sync::LazyLock as Lazy;
use crate::ui::style;
use crate::{backend, env, ui};
#[derive(Debug, Cl... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/ui/prompt.rs | src/ui/prompt.rs | use std::sync::Mutex;
use demand::{Confirm, Dialog, DialogButton};
use crate::env;
use crate::ui::ctrlc;
use crate::ui::theme::get_theme;
static MUTEX: Mutex<()> = Mutex::new(());
static SKIP_PROMPT: Mutex<bool> = Mutex::new(false);
pub fn confirm<S: Into<String>>(message: S) -> eyre::Result<bool> {
let _lock ... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/ui/mod.rs | src/ui/mod.rs | pub use prompt::confirm;
#[cfg_attr(any(test, windows), path = "ctrlc_stub.rs")]
pub mod ctrlc;
pub(crate) mod info;
pub mod multi_progress_report;
pub mod osc;
pub mod progress_report;
pub mod prompt;
pub mod style;
pub mod table;
pub mod theme;
pub mod time;
pub mod tree;
| rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/ui/style.rs | src/ui/style.rs | use std::path::Path;
use crate::file::display_path;
use console::{StyledObject, style};
pub fn ereset() -> String {
if console::colors_enabled_stderr() {
"\x1b[0m".to_string()
} else {
"".to_string()
}
}
pub fn estyle<D>(val: D) -> StyledObject<D> {
style(val).for_stderr()
}
pub fn e... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/ui/ctrlc_stub.rs | src/ui/ctrlc_stub.rs | pub fn init() {}
// pub fn add_handler(_func: impl Fn() + Send + Sync + 'static) {}
pub fn exit_on_ctrl_c(_do_exit: bool) {}
/// ensures cursor is displayed on ctrl-c
pub fn show_cursor_after_ctrl_c() {}
| rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/ui/ctrlc.rs | src/ui/ctrlc.rs | use crate::exit;
use std::sync::atomic::{AtomicBool, Ordering};
use crate::cmd::CmdLineRunner;
use console::Term;
static EXIT: AtomicBool = AtomicBool::new(true);
static SHOW_CURSOR: AtomicBool = AtomicBool::new(false);
// static HANDLERS: OnceCell<Vec<Box<dyn Fn() + Send + Sync + 'static>>> = OnceCell::new();
pub f... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/ui/osc.rs | src/ui/osc.rs | /// OSC (Operating System Command) escape sequences for terminal integration
///
/// This module provides support for OSC escape sequences that allow terminal
/// integration features like progress bars in Ghostty, VS Code, Windows Terminal,
/// and VTE-based terminals.
use std::io::{self, Write};
use std::sync::OnceLo... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/shell/pwsh.rs | src/shell/pwsh.rs | #![allow(unknown_lints)]
#![allow(clippy::literal_string_with_formatting_args)]
use crate::config::Settings;
use std::borrow::Cow;
use std::fmt::Display;
use indoc::formatdoc;
use crate::shell::{self, ActivateOptions, Shell};
#[derive(Default)]
pub struct Pwsh {}
impl Pwsh {}
impl Shell for Pwsh {
fn activate(... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/shell/elvish.rs | src/shell/elvish.rs | #![allow(unknown_lints)]
#![allow(clippy::literal_string_with_formatting_args)]
use std::fmt::Display;
use crate::shell::{self, ActivateOptions, Shell};
use indoc::formatdoc;
use shell_escape::unix::escape;
#[derive(Default)]
pub struct Elvish {}
impl Shell for Elvish {
fn activate(&self, opts: ActivateOptions) ... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/shell/nushell.rs | src/shell/nushell.rs | #![allow(unknown_lints)]
#![allow(clippy::literal_string_with_formatting_args)]
use std::fmt::Display;
use indoc::formatdoc;
use crate::shell::{self, ActivateOptions, ActivatePrelude, Shell};
use itertools::Itertools;
#[derive(Default)]
pub struct Nushell {}
enum EnvOp<'a> {
Set { key: &'a str, val: &'a str },
... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/shell/bash.rs | src/shell/bash.rs | #![allow(unknown_lints)]
#![allow(clippy::literal_string_with_formatting_args)]
use std::fmt::Display;
use indoc::formatdoc;
use shell_escape::unix::escape;
use crate::config::Settings;
use crate::shell::{self, ActivateOptions, Shell};
#[derive(Default)]
pub struct Bash {}
impl Bash {}
impl Shell for Bash {
fn... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/shell/xonsh.rs | src/shell/xonsh.rs | #![allow(unknown_lints)]
#![allow(clippy::literal_string_with_formatting_args)]
use std::borrow::Cow;
use std::fmt::Display;
use indoc::formatdoc;
use crate::shell::{self, ActivateOptions, Shell};
#[derive(Default)]
pub struct Xonsh {}
fn xonsh_escape_sq(input: &str) -> Cow<'_, str> {
for (i, ch) in input.char_... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/shell/zsh.rs | src/shell/zsh.rs | #![allow(unknown_lints)]
#![allow(clippy::literal_string_with_formatting_args)]
use std::fmt::Display;
use indoc::formatdoc;
use shell_escape::unix::escape;
use crate::config::Settings;
use crate::shell::bash::Bash;
use crate::shell::{self, ActivateOptions, Shell};
#[derive(Default)]
pub struct Zsh {}
impl Zsh {}
... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/shell/mod.rs | src/shell/mod.rs | use crate::env;
use crate::hook_env;
use itertools::Itertools;
use std::fmt::{Display, Formatter};
use std::path::PathBuf;
use std::str::FromStr;
mod bash;
mod elvish;
mod fish;
mod nushell;
mod pwsh;
mod xonsh;
mod zsh;
#[derive(Debug, Clone, Copy, PartialEq, Eq, clap::ValueEnum)]
pub enum ShellType {
Bash,
... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/shell/fish.rs | src/shell/fish.rs | #![allow(unknown_lints)]
#![allow(clippy::literal_string_with_formatting_args)]
use std::fmt::{Display, Formatter};
use crate::config::Settings;
use crate::env::{self};
use crate::shell::{self, ActivateOptions, Shell};
use indoc::formatdoc;
use itertools::Itertools;
use shell_escape::unix::escape;
#[derive(Default)]
... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/engine.rs | src/prepare/engine.rs | use std::collections::BTreeMap;
use std::path::{Path, PathBuf};
use std::sync::Arc;
use std::time::SystemTime;
use eyre::Result;
use crate::cmd::CmdLineRunner;
use crate::config::{Config, Settings};
use crate::parallel;
use crate::ui::multi_progress_report::MultiProgressReport;
use super::PrepareProvider;
use super:... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/mod.rs | src/prepare/mod.rs | use std::collections::BTreeMap;
use std::fmt::Debug;
use std::path::{Path, PathBuf};
use std::sync::Arc;
use eyre::{Result, bail};
use crate::config::{Config, Settings};
use crate::env;
pub use engine::{PrepareEngine, PrepareOptions, PrepareStepResult};
pub use rule::PrepareConfig;
mod engine;
pub mod providers;
mo... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/rule.rs | src/prepare/rule.rs | use std::collections::BTreeMap;
use serde::{Deserialize, Serialize};
/// List of built-in provider names that have specialized implementations
pub const BUILTIN_PROVIDERS: &[&str] = &[
"npm", "yarn", "pnpm", "bun", // Node.js
"go", // Go
"pip", // Python (requirements.txt)
"poetry", ... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/providers/yarn.rs | src/prepare/providers/yarn.rs | use std::path::{Path, PathBuf};
use eyre::Result;
use crate::prepare::rule::PrepareProviderConfig;
use crate::prepare::{PrepareCommand, PrepareProvider};
/// Prepare provider for yarn (yarn.lock)
#[derive(Debug)]
pub struct YarnPrepareProvider {
project_root: PathBuf,
config: PrepareProviderConfig,
}
impl Y... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/providers/go.rs | src/prepare/providers/go.rs | use std::path::{Path, PathBuf};
use eyre::Result;
use crate::prepare::rule::PrepareProviderConfig;
use crate::prepare::{PrepareCommand, PrepareProvider};
/// Prepare provider for Go (go.sum)
#[derive(Debug)]
pub struct GoPrepareProvider {
project_root: PathBuf,
config: PrepareProviderConfig,
}
impl GoPrepar... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/providers/pnpm.rs | src/prepare/providers/pnpm.rs | use std::path::{Path, PathBuf};
use eyre::Result;
use crate::prepare::rule::PrepareProviderConfig;
use crate::prepare::{PrepareCommand, PrepareProvider};
/// Prepare provider for pnpm (pnpm-lock.yaml)
#[derive(Debug)]
pub struct PnpmPrepareProvider {
project_root: PathBuf,
config: PrepareProviderConfig,
}
i... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/providers/poetry.rs | src/prepare/providers/poetry.rs | use std::path::{Path, PathBuf};
use eyre::Result;
use crate::prepare::rule::PrepareProviderConfig;
use crate::prepare::{PrepareCommand, PrepareProvider};
/// Prepare provider for Poetry (poetry.lock)
#[derive(Debug)]
pub struct PoetryPrepareProvider {
project_root: PathBuf,
config: PrepareProviderConfig,
}
... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/providers/mod.rs | src/prepare/providers/mod.rs | mod bun;
mod bundler;
mod composer;
mod custom;
mod go;
mod npm;
mod pip;
mod pnpm;
mod poetry;
mod uv;
mod yarn;
pub use bun::BunPrepareProvider;
pub use bundler::BundlerPrepareProvider;
pub use composer::ComposerPrepareProvider;
pub use custom::CustomPrepareProvider;
pub use go::GoPrepareProvider;
pub use npm::NpmPr... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/providers/bun.rs | src/prepare/providers/bun.rs | use std::path::{Path, PathBuf};
use eyre::Result;
use crate::prepare::rule::PrepareProviderConfig;
use crate::prepare::{PrepareCommand, PrepareProvider};
/// Prepare provider for bun (bun.lockb or bun.lock)
#[derive(Debug)]
pub struct BunPrepareProvider {
project_root: PathBuf,
config: PrepareProviderConfig,... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/providers/npm.rs | src/prepare/providers/npm.rs | use std::path::{Path, PathBuf};
use eyre::Result;
use crate::prepare::rule::PrepareProviderConfig;
use crate::prepare::{PrepareCommand, PrepareProvider};
/// Prepare provider for npm (package-lock.json)
#[derive(Debug)]
pub struct NpmPrepareProvider {
project_root: PathBuf,
config: PrepareProviderConfig,
}
... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/providers/composer.rs | src/prepare/providers/composer.rs | use std::path::{Path, PathBuf};
use eyre::Result;
use crate::prepare::rule::PrepareProviderConfig;
use crate::prepare::{PrepareCommand, PrepareProvider};
/// Prepare provider for PHP Composer (composer.lock)
#[derive(Debug)]
pub struct ComposerPrepareProvider {
project_root: PathBuf,
config: PrepareProviderC... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/providers/bundler.rs | src/prepare/providers/bundler.rs | use std::path::{Path, PathBuf};
use eyre::Result;
use crate::prepare::rule::PrepareProviderConfig;
use crate::prepare::{PrepareCommand, PrepareProvider};
/// Prepare provider for Ruby Bundler (Gemfile.lock)
#[derive(Debug)]
pub struct BundlerPrepareProvider {
project_root: PathBuf,
config: PrepareProviderCon... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/providers/pip.rs | src/prepare/providers/pip.rs | use std::path::{Path, PathBuf};
use eyre::Result;
use crate::prepare::rule::PrepareProviderConfig;
use crate::prepare::{PrepareCommand, PrepareProvider};
/// Prepare provider for pip (requirements.txt)
#[derive(Debug)]
pub struct PipPrepareProvider {
project_root: PathBuf,
config: PrepareProviderConfig,
}
i... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/providers/uv.rs | src/prepare/providers/uv.rs | use std::path::{Path, PathBuf};
use eyre::Result;
use crate::prepare::rule::PrepareProviderConfig;
use crate::prepare::{PrepareCommand, PrepareProvider};
/// Prepare provider for uv (uv.lock)
#[derive(Debug)]
pub struct UvPrepareProvider {
project_root: PathBuf,
config: PrepareProviderConfig,
}
impl UvPrepa... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/src/prepare/providers/custom.rs | src/prepare/providers/custom.rs | use std::path::PathBuf;
use eyre::Result;
use glob::glob;
use crate::prepare::rule::PrepareProviderConfig;
use crate::prepare::{PrepareCommand, PrepareProvider};
/// Prepare provider for user-defined custom rules from mise.toml [prepare.*]
#[derive(Debug)]
pub struct CustomPrepareProvider {
id: String,
confi... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/aqua-registry/build.rs | crates/aqua-registry/build.rs | use std::env;
use std::fs;
use std::path::Path;
fn main() {
let out_dir = env::var("OUT_DIR").expect("OUT_DIR environment variable must be set");
generate_baked_registry(&out_dir);
}
fn generate_baked_registry(out_dir: &str) {
let dest_path = Path::new(out_dir).join("aqua_standard_registry.rs");
let r... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/aqua-registry/src/lib.rs | crates/aqua-registry/src/lib.rs | //! Aqua Registry
//!
//! This crate provides functionality for working with Aqua package registry files.
//! It can load registry data from baked-in files, local repositories, or remote HTTP sources.
mod registry;
mod template;
mod types;
// Re-export only what's needed by the main mise crate
pub use registry::{
... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/aqua-registry/src/template.rs | crates/aqua-registry/src/template.rs | use eyre::{ContextCompat, Result, bail};
use heck::ToTitleCase;
use itertools::Itertools;
use std::collections::HashMap;
use std::fmt::Debug;
use std::sync::LazyLock;
use versions::Versioning;
type Context = HashMap<String, String>;
/// AST node representing an expression in the template
#[derive(Debug, Clone, Partia... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/aqua-registry/src/types.rs | crates/aqua-registry/src/types.rs | use expr::{Context, Environment, Program, Value};
use eyre::{Result, eyre};
use indexmap::IndexSet;
use itertools::Itertools;
use serde_derive::Deserialize;
use std::cmp::PartialEq;
use std::collections::HashMap;
use versions::Versioning;
/// Type of Aqua package
#[derive(Debug, Deserialize, Default, Clone, PartialEq,... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/aqua-registry/src/registry.rs | crates/aqua-registry/src/registry.rs | use crate::types::{AquaPackage, RegistryYaml};
use crate::{AquaRegistryConfig, AquaRegistryError, CacheStore, RegistryFetcher, Result};
use std::collections::HashMap;
use std::path::PathBuf;
use std::sync::LazyLock;
use tokio::sync::Mutex;
/// The main Aqua registry implementation
#[derive(Debug)]
pub struct AquaRegis... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/build.rs | crates/vfox/build.rs | use std::collections::BTreeMap;
use std::env;
use std::fs;
use std::path::Path;
fn main() {
codegen_embedded_plugins();
}
/// Convert a path to a string with forward slashes (required for include_str! on Windows)
fn path_to_forward_slashes(path: &Path) -> String {
path.to_string_lossy().replace('\\', "/")
}
... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/vfox.rs | crates/vfox/src/vfox.rs | use itertools::Itertools;
use reqwest::Url;
use std::collections::BTreeMap;
use std::path::{Path, PathBuf};
use std::str::FromStr;
use std::sync::mpsc;
use tempfile::TempDir;
use xx::file;
use crate::error::Result;
use crate::hooks::available::AvailableVersion;
use crate::hooks::backend_exec_env::BackendExecEnvContext... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/config.rs | crates/vfox/src/config.rs | use std::env::consts::{ARCH, OS};
use std::path::PathBuf;
use std::sync::{Mutex, MutexGuard};
#[derive(Debug, Clone)]
pub struct Config {
pub plugin_dir: PathBuf,
}
static CONFIG: Mutex<Option<Config>> = Mutex::new(None);
impl Config {
pub fn get() -> Self {
Self::_get().as_ref().unwrap().clone()
... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/embedded_plugins.rs | crates/vfox/src/embedded_plugins.rs | // This module provides access to embedded vfox plugin Lua code.
// The actual code is generated at build time by build.rs
include!(concat!(env!("OUT_DIR"), "/embedded_plugins.rs"));
| rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/sdk_info.rs | crates/vfox/src/sdk_info.rs | use mlua::{IntoLua, Lua, Value};
use std::path::PathBuf;
#[derive(Debug, Clone)]
pub struct SdkInfo {
pub name: String,
pub version: String,
pub path: PathBuf,
}
impl SdkInfo {
pub fn new(name: String, version: String, path: PathBuf) -> Self {
Self {
name,
version,
... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/lib.rs | crates/vfox/src/lib.rs | #[cfg(test)]
#[macro_use]
extern crate insta;
#[macro_use]
extern crate log;
#[macro_use]
extern crate mlua;
pub use error::Result as VfoxResult;
pub use error::VfoxError;
pub use plugin::Plugin;
pub use vfox::Vfox;
mod config;
mod context;
pub mod embedded_plugins;
mod error;
mod hooks;
mod http;
mod lua_mod;
mod me... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/http.rs | crates/vfox/src/http.rs | use reqwest::{Client, ClientBuilder};
use std::sync::LazyLock;
pub static CLIENT: LazyLock<Client> = LazyLock::new(|| {
ClientBuilder::new()
.user_agent(format!("vfox.rs/{}", env!("CARGO_PKG_VERSION")))
.build()
.expect("Failed to create reqwest client")
});
| rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/error.rs | crates/vfox/src/error.rs | use mlua::Error as MLuaError;
use thiserror::Error;
use xx::XXError;
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum VfoxError {
#[error("{0}")]
Error(String),
#[error(transparent)]
LuaError(#[from] MLuaError),
#[error("serde_json")]
SerdeJsonError(#[from] serde_json::Error),
#[error(tra... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/runtime.rs | crates/vfox/src/runtime.rs | use crate::config::{arch, os};
use mlua::{UserData, UserDataFields};
use once_cell::sync::Lazy;
use std::path::PathBuf;
use std::sync::Mutex;
#[derive(Debug, Clone)]
pub(crate) struct Runtime {
pub(crate) os: String,
pub(crate) arch: String,
pub(crate) version: String,
pub(crate) plugin_dir_path: PathB... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/bin.rs | crates/vfox/src/bin.rs | #[cfg(feature = "cli")]
#[macro_use]
extern crate log;
#[cfg(feature = "cli")]
mod cli;
#[allow(clippy::needless_return)]
#[cfg(feature = "cli")]
#[tokio::main]
async fn main() {
env_logger::init_from_env(env_logger::Env::default().filter_or("VFOX_LOG", "info"));
if let Err(err) = cli::run().await {
e... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/registry.rs | crates/vfox/src/registry.rs | use std::collections::BTreeMap;
use std::str::FromStr;
use once_cell::sync::Lazy;
use url::Url;
static SDKS: Lazy<BTreeMap<String, Url>> = Lazy::new(|| {
[
("nodejs", "https://github.com/version-fox/vfox-nodejs"),
("cmake", "https://github.com/version-fox/vfox-cmake"),
]
.iter()
.map(|... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/context.rs | crates/vfox/src/context.rs | use mlua::{UserData, UserDataFields};
#[derive(Debug)]
pub(crate) struct Context {
pub args: Vec<String>,
pub(crate) version: Option<String>,
// pub(crate) runtime_version: String,
}
impl UserData for Context {
fn add_fields<F: UserDataFields<Self>>(fields: &mut F) {
fields.add_field_method_ge... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/metadata.rs | crates/vfox/src/metadata.rs | use mlua::Table;
use std::collections::BTreeSet;
use crate::error::Result;
use crate::error::VfoxError;
#[derive(Debug, Clone)]
pub struct Metadata {
pub name: String,
pub legacy_filenames: Vec<String>,
pub version: String,
pub description: Option<String>,
pub author: Option<String>,
pub licen... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/plugin.rs | crates/vfox/src/plugin.rs | use std::cmp::Ordering;
use std::fmt::Display;
use std::path::{Path, PathBuf};
use mlua::{AsChunk, FromLuaMulti, IntoLua, Lua, Table, Value};
use once_cell::sync::OnceCell;
use crate::config::Config;
use crate::context::Context;
use crate::embedded_plugins::{self, EmbeddedPlugin};
use crate::error::Result;
use crate:... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/hooks/mise_env.rs | crates/vfox/src/hooks/mise_env.rs | use mlua::{IntoLua, Lua, LuaSerdeExt, Value};
use crate::Plugin;
use crate::error::Result;
use crate::hooks::env_keys::EnvKey;
#[derive(Debug)]
pub struct MiseEnvContext<T: serde::Serialize> {
pub args: Vec<String>,
pub options: T,
}
impl Plugin {
pub async fn mise_env<T: serde::Serialize>(
&self... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/hooks/parse_legacy_file.rs | crates/vfox/src/hooks/parse_legacy_file.rs | use mlua::prelude::LuaError;
use mlua::{FromLua, IntoLua, Lua, MultiValue, Value};
use std::path::{Path, PathBuf};
use crate::Plugin;
use crate::error::Result;
#[derive(Debug)]
pub struct LegacyFileContext {
pub args: Vec<String>,
pub filepath: PathBuf,
}
#[derive(Debug)]
pub struct ParseLegacyFileResponse {... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/hooks/backend_list_versions.rs | crates/vfox/src/hooks/backend_list_versions.rs | use crate::{Plugin, error::Result};
use mlua::{FromLua, IntoLua, Lua, Value, prelude::LuaError};
#[derive(Debug, Clone)]
pub struct BackendListVersionsContext {
pub tool: String,
}
#[derive(Debug, Clone)]
pub struct BackendListVersionsResponse {
pub versions: Vec<String>,
}
impl Plugin {
pub async fn bac... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/hooks/env_keys.rs | crates/vfox/src/hooks/env_keys.rs | use mlua::prelude::LuaError;
use mlua::{FromLua, IntoLua, Lua, LuaSerdeExt, Value};
use std::collections::BTreeMap;
use std::path::PathBuf;
use crate::Plugin;
use crate::error::Result;
use crate::sdk_info::SdkInfo;
#[derive(Debug)]
pub struct EnvKey {
pub key: String,
pub value: String,
}
#[derive(Debug)]
pu... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/hooks/available.rs | crates/vfox/src/hooks/available.rs | use mlua::prelude::LuaError;
use mlua::{FromLua, Lua, Value};
use crate::Plugin;
use crate::error::Result;
impl Plugin {
#[allow(clippy::needless_return)] // seems to be a clippy bug
#[tokio::main(flavor = "current_thread")]
pub async fn available(&self) -> Result<Vec<AvailableVersion>> {
self.ava... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/hooks/post_install.rs | crates/vfox/src/hooks/post_install.rs | use crate::Plugin;
use crate::error::Result;
use crate::sdk_info::SdkInfo;
use mlua::{IntoLua, Lua, Value};
use std::collections::BTreeMap;
use std::path::PathBuf;
impl Plugin {
pub async fn post_install(&self, ctx: PostInstallContext) -> Result<()> {
debug!("[vfox:{}] post_install", &self.name);
s... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/hooks/pre_use.rs | crates/vfox/src/hooks/pre_use.rs | use indexmap::IndexMap;
use std::path::Path;
use crate::error::Result;
use crate::sdk_info::SdkInfo;
use crate::{Plugin, Vfox};
#[allow(dead_code)]
#[derive(Debug)]
pub struct PreUseContext {
pub installed_sdks: IndexMap<String, SdkInfo>,
}
#[derive(Debug)]
pub struct PreUseResponse {
pub version: Option<Str... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/hooks/mod.rs | crates/vfox/src/hooks/mod.rs | pub mod available;
pub mod backend_exec_env;
pub mod backend_install;
pub mod backend_list_versions;
pub mod env_keys;
pub mod mise_env;
pub mod mise_path;
pub mod parse_legacy_file;
pub mod post_install;
pub mod pre_install;
pub mod pre_use;
| rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/hooks/backend_install.rs | crates/vfox/src/hooks/backend_install.rs | use mlua::{FromLua, IntoLua, Lua, Value, prelude::LuaError};
use std::path::PathBuf;
use crate::{Plugin, error::Result};
#[derive(Debug)]
pub struct BackendInstallContext {
pub tool: String,
pub version: String,
pub install_path: PathBuf,
}
#[derive(Debug)]
pub struct BackendInstallResponse {}
impl Plug... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/hooks/pre_install.rs | crates/vfox/src/hooks/pre_install.rs | use std::path::PathBuf;
use mlua::prelude::LuaError;
use mlua::{FromLua, Lua, Table, Value};
use crate::Plugin;
use crate::error::Result;
impl Plugin {
pub async fn pre_install(&self, version: &str) -> Result<PreInstall> {
debug!("[vfox:{}] pre_install", &self.name);
let ctx = self.context(Some(v... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/hooks/mise_path.rs | crates/vfox/src/hooks/mise_path.rs | use mlua::{IntoLua, Lua, LuaSerdeExt, Value};
use crate::Plugin;
use crate::error::Result;
#[derive(Debug)]
pub struct MisePathContext<T: serde::Serialize> {
pub args: Vec<String>,
pub options: T,
}
impl Plugin {
pub async fn mise_path<T: serde::Serialize>(
&self,
ctx: MisePathContext<T>,... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/hooks/backend_exec_env.rs | crates/vfox/src/hooks/backend_exec_env.rs | use mlua::{FromLua, IntoLua, Lua, Value, prelude::LuaError};
use std::path::PathBuf;
use crate::{Plugin, error::Result, hooks::env_keys::EnvKey};
#[derive(Debug, Clone)]
pub struct BackendExecEnvContext {
pub tool: String,
pub version: String,
pub install_path: PathBuf,
}
#[derive(Debug)]
pub struct Back... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/lua_mod/html.rs | crates/vfox/src/lua_mod/html.rs | use mlua::{Lua, Table};
pub fn mod_html(lua: &Lua) -> mlua::Result<()> {
let package: Table = lua.globals().get("package")?;
let loaded: Table = package.get("loaded")?;
loaded.set(
"htmlparser.voidelements",
lua.load(include_str!("../../lua/htmlparser/voidelements.lua"))
.eval::... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/lua_mod/http.rs | crates/vfox/src/lua_mod/http.rs | use mlua::{BorrowedStr, ExternalResult, Lua, MultiValue, Result, Table};
use reqwest::header::{HeaderMap, HeaderName, HeaderValue};
use crate::http::CLIENT;
pub fn mod_http(lua: &Lua) -> Result<()> {
let package: Table = lua.globals().get("package")?;
let loaded: Table = package.get("loaded")?;
loaded.set... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/lua_mod/env.rs | crates/vfox/src/lua_mod/env.rs | use mlua::Table;
use mlua::prelude::*;
pub fn mod_env(lua: &Lua) -> LuaResult<()> {
let package: Table = lua.globals().get("package")?;
let loaded: Table = package.get("loaded")?;
let env = lua.create_table_from(vec![("setenv", lua.create_function(setenv)?)])?;
loaded.set("env", env.clone())?;
load... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/lua_mod/json.rs | crates/vfox/src/lua_mod/json.rs | use mlua::{ExternalResult, Lua, LuaSerdeExt, Result, Table, Value};
pub fn mod_json(lua: &Lua) -> Result<()> {
let package: Table = lua.globals().get("package")?;
let loaded: Table = package.get("loaded")?;
loaded.set(
"json",
lua.create_table_from(vec![
("encode", lua.create_fu... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/lua_mod/file.rs | crates/vfox/src/lua_mod/file.rs | use crate::error::Result;
use mlua::{ExternalResult, Lua, MultiValue, Table};
#[cfg(unix)]
use std::os::unix::fs::symlink as _symlink;
#[cfg(windows)]
use std::os::windows::fs::symlink_dir;
#[cfg(windows)]
use std::os::windows::fs::symlink_file;
use std::path::Path;
fn join_path(_lua: &Lua, args: MultiValue) -> mlua::... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/lua_mod/hooks.rs | crates/vfox/src/lua_mod/hooks.rs | use crate::embedded_plugins::EmbeddedPlugin;
use crate::error::Result;
use mlua::Lua;
use std::collections::BTreeSet;
use std::path::Path;
pub struct HookFunc {
_name: &'static str,
pub filename: &'static str,
}
#[rustfmt::skip]
pub const HOOK_FUNCS: [HookFunc; 12] = [
HookFunc { _name: "Available", filen... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/lua_mod/mod.rs | crates/vfox/src/lua_mod/mod.rs | mod archiver;
mod cmd;
mod env;
mod file;
mod hooks;
mod html;
mod http;
mod json;
mod strings;
pub use archiver::mod_archiver as archiver;
pub use cmd::mod_cmd as cmd;
pub use env::mod_env as env;
pub use file::mod_file as file;
pub use hooks::hooks_embedded;
pub use hooks::mod_hooks as hooks;
pub use html::mod_html ... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/lua_mod/strings.rs | crates/vfox/src/lua_mod/strings.rs | use mlua::prelude::*;
use mlua::{Table, Value};
pub fn mod_strings(lua: &Lua) -> LuaResult<()> {
let package: Table = lua.globals().get("package")?;
let loaded: Table = package.get("loaded")?;
let strings = lua.create_table_from(vec![
("split", lua.create_function(split)?),
("has_prefix", l... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/lua_mod/cmd.rs | crates/vfox/src/lua_mod/cmd.rs | use mlua::Table;
use mlua::prelude::*;
use std::path::Path;
pub fn mod_cmd(lua: &Lua) -> LuaResult<()> {
let package: Table = lua.globals().get("package")?;
let loaded: Table = package.get("loaded")?;
let cmd = lua.create_table_from(vec![("exec", lua.create_function(exec)?)])?;
loaded.set("cmd", cmd.cl... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/lua_mod/archiver.rs | crates/vfox/src/lua_mod/archiver.rs | use crate::error::Result;
use mlua::{ExternalResult, Lua, MultiValue, Table};
use std::path::PathBuf;
pub fn mod_archiver(lua: &Lua) -> Result<()> {
let package: Table = lua.globals().get("package")?;
let loaded: Table = package.get("loaded")?;
Ok(loaded.set(
"archiver",
lua.create_table_fr... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/cli/env_keys.rs | crates/vfox/src/cli/env_keys.rs | use vfox::{Vfox, VfoxResult};
#[derive(clap::Args)]
pub struct EnvKeys {
pub sdk: String,
pub version: String,
}
impl EnvKeys {
pub async fn run(&self) -> VfoxResult<()> {
let vfox = Vfox::new();
let env_keys = vfox
.env_keys(
&self.sdk,
&self.ve... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/cli/install.rs | crates/vfox/src/cli/install.rs | use std::path::PathBuf;
use vfox::{Vfox, VfoxResult};
#[derive(clap::Args)]
pub struct Install {
pub sdk: String,
pub version: String,
#[clap(short, long)]
pub output_dir: Option<PathBuf>,
}
impl Install {
pub async fn run(&self) -> VfoxResult<()> {
let vfox = Vfox::new();
let out ... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/cli/available.rs | crates/vfox/src/cli/available.rs | use vfox::{Vfox, VfoxResult};
#[derive(clap::Args)]
pub struct Available {}
impl Available {
pub async fn run(&self) -> VfoxResult<()> {
for (name, url) in Vfox::list_available_sdks() {
println!("{name} {url}");
}
Ok(())
}
}
| rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/cli/mod.rs | crates/vfox/src/cli/mod.rs | use clap::Parser;
use vfox::VfoxResult;
mod available;
mod env_keys;
mod install;
mod plugins;
#[derive(Parser)]
#[command(version)]
pub(crate) struct Cli {
#[command(subcommand)]
command: Commands,
}
#[derive(clap::Subcommand)]
enum Commands {
Available(available::Available),
EnvKeys(env_keys::EnvKe... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/cli/plugins/list.rs | crates/vfox/src/cli/plugins/list.rs | use vfox::Vfox;
use vfox::VfoxResult;
#[derive(clap::Args)]
#[command(alias = "ls")]
pub struct List {}
impl List {
pub async fn run(&self) -> VfoxResult<()> {
let vfox = Vfox::new();
let sdks = vfox.list_sdks()?;
for sdk in sdks {
println!("{sdk}");
}
Ok(())
... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
jdx/mise | https://github.com/jdx/mise/blob/3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb/crates/vfox/src/cli/plugins/mod.rs | crates/vfox/src/cli/plugins/mod.rs | use vfox::VfoxResult;
mod list;
#[derive(clap::Subcommand)]
pub(crate) enum Commands {
// Install(install::Install),
List(list::List),
}
#[derive(clap::Args)]
pub(crate) struct Plugins {
#[clap(subcommand)]
command: Commands,
}
impl Plugins {
pub(crate) async fn run(&self) -> VfoxResult<()> {
... | rust | MIT | 3e382b34b6bf7d7b1a0efb8fdd8ea10c84498adb | 2026-01-04T15:39:11.175160Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/fuzz/fuzz_targets/rome_parse_jsx.rs | fuzz/fuzz_targets/rome_parse_jsx.rs | #![cfg_attr(not(feature = "rome_all"), no_main)]
#[path = "rome_common.rs"]
mod rome_common;
use libfuzzer_sys::Corpus;
use rome_js_syntax::JsFileSource;
pub fn do_fuzz(case: &[u8]) -> Corpus {
let parse_type = JsFileSource::jsx();
rome_common::fuzz_js_parser_with_source_type(case, parse_type)
}
#[cfg(not(f... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/fuzz/fuzz_targets/rome_format_d_ts.rs | fuzz/fuzz_targets/rome_format_d_ts.rs | #![cfg_attr(not(feature = "rome_all"), no_main)]
#[path = "rome_common.rs"]
mod rome_common;
use libfuzzer_sys::Corpus;
use rome_js_syntax::JsFileSource;
pub fn do_fuzz(case: &[u8]) -> Corpus {
let parse_type = JsFileSource::d_ts();
rome_common::fuzz_js_formatter_with_source_type(case, parse_type)
}
#[cfg(n... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/fuzz/fuzz_targets/rome_format_json.rs | fuzz/fuzz_targets/rome_format_json.rs | #![cfg_attr(not(feature = "rome_all"), no_main)]
#[path = "rome_common.rs"]
mod rome_common;
use libfuzzer_sys::Corpus;
pub fn do_fuzz(case: &[u8]) -> Corpus {
rome_common::fuzz_json_formatter(case)
}
#[cfg(not(feature = "rome_all"))]
libfuzzer_sys::fuzz_target!(|case: &[u8]| -> Corpus { do_fuzz(case) });
| rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/fuzz/fuzz_targets/rome_format_all.rs | fuzz/fuzz_targets/rome_format_all.rs | #![no_main]
mod rome_format_d_ts;
mod rome_format_jsx;
mod rome_format_module;
mod rome_format_script;
mod rome_format_tsx;
mod rome_format_typescript;
use libfuzzer_sys::{fuzz_target, Corpus};
fn do_fuzz(data: &[u8]) -> Corpus {
let mut keep = Corpus::Reject;
if let Corpus::Keep = rome_format_d_ts::do_fuzz(... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
rome/tools | https://github.com/rome/tools/blob/392d188a49d70e495f13b1bb08cd7d9c43690f9b/fuzz/fuzz_targets/rome_parse_typescript.rs | fuzz/fuzz_targets/rome_parse_typescript.rs | #![cfg_attr(not(feature = "rome_all"), no_main)]
#[path = "rome_common.rs"]
mod rome_common;
use libfuzzer_sys::Corpus;
use rome_js_syntax::JsFileSource;
pub fn do_fuzz(case: &[u8]) -> Corpus {
let parse_type = JsFileSource::ts();
rome_common::fuzz_js_parser_with_source_type(case, parse_type)
}
#[cfg(not(fe... | rust | MIT | 392d188a49d70e495f13b1bb08cd7d9c43690f9b | 2026-01-04T15:38:12.578592Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.