formal-ai 0.172.0

Formal symbolic AI implementation with OpenAI-compatible APIs
Documentation
//! The catalog of supported programming languages. Adding a language is a
//! matter of extending [`PROGRAM_LANGUAGES`] with its fences, aliases, and
//! verified execution metadata — the engine does not change.

use super::types::{ExecutionStatus, ProgramExecution, ProgramLanguage};

pub const PROGRAM_LANGUAGES: &[ProgramLanguage] = &[
    ProgramLanguage {
        slug: "rust",
        name: "Rust",
        aliases: &["rust", "rs", "раст", "расте"],
        code_fence: "rust",
        execution: ProgramExecution {
            status: ExecutionStatus::Verified,
            environment: "issue-8 local verification harness (isolated sandbox)",
            check_command: Some("rustc main.rs -o main"),
            run_command: "./main",
            notes: "1 iteration completed under the 1 minute execution budget; no timeout reduction was needed.",
        },
        source: "local Links Notation write-program seed",
        save_as: "main.rs",
        setup_hint: "the Rust toolchain from https://rustup.rs",
    },
    ProgramLanguage {
        slug: "python",
        name: "Python",
        aliases: &["python", "py", "питон", "питоне"],
        code_fence: "python",
        execution: ProgramExecution {
            status: ExecutionStatus::Verified,
            environment: "issue-8 local verification harness (isolated sandbox)",
            check_command: Some("python3 -m py_compile main.py"),
            run_command: "python3 main.py",
            notes: "1 iteration completed under the 1 minute execution budget; no timeout reduction was needed.",
        },
        source: "local Links Notation write-program seed",
        save_as: "main.py",
        setup_hint: "Python 3 from https://www.python.org/downloads/",
    },
    ProgramLanguage {
        slug: "javascript",
        name: "JavaScript",
        aliases: &["javascript", "js", "node", "джаваскрипт"],
        code_fence: "javascript",
        execution: ProgramExecution {
            status: ExecutionStatus::Verified,
            environment: "issue-8 local verification harness (isolated sandbox)",
            check_command: Some("node --check main.js"),
            run_command: "node main.js",
            notes: "1 iteration completed under the 1 minute execution budget; no timeout reduction was needed.",
        },
        source: "local Links Notation write-program seed",
        save_as: "main.js",
        setup_hint: "Node.js from https://nodejs.org/",
    },
    ProgramLanguage {
        slug: "typescript",
        name: "TypeScript",
        aliases: &["typescript", "ts", "тайпскрипт"],
        code_fence: "typescript",
        execution: ProgramExecution {
            status: ExecutionStatus::Unavailable,
            environment: "TypeScript compiler is not configured in this repository runtime",
            check_command: Some("tsc hello.ts"),
            run_command: "node hello.js",
            notes: "The TypeScript seed is returned with this warning until a tsc-backed execution profile is available.",
        },
        source: "local Links Notation write-program seed",
        save_as: "hello.ts",
        setup_hint: "Node.js from https://nodejs.org/ plus TypeScript via `npm install -g typescript`",
    },
    ProgramLanguage {
        slug: "go",
        name: "Go",
        aliases: &["go", "golang", "го"],
        code_fence: "go",
        execution: ProgramExecution {
            status: ExecutionStatus::Verified,
            environment: "issue-8 local verification harness (isolated sandbox)",
            check_command: None,
            run_command: "go run main.go",
            notes: "1 iteration completed under the 1 minute execution budget; no timeout reduction was needed.",
        },
        source: "local Links Notation write-program seed",
        save_as: "main.go",
        setup_hint: "Go from https://go.dev/dl/",
    },
    ProgramLanguage {
        slug: "c",
        name: "C",
        aliases: &["c"],
        code_fence: "c",
        execution: ProgramExecution {
            status: ExecutionStatus::Verified,
            environment: "issue-8 local verification harness (isolated sandbox)",
            check_command: Some("gcc main.c -o main"),
            run_command: "./main",
            notes: "1 iteration completed under the 1 minute execution budget; no timeout reduction was needed.",
        },
        source: "local Links Notation write-program seed",
        save_as: "main.c",
        setup_hint: "a C compiler such as GCC from https://gcc.gnu.org/ or your package manager",
    },
    ProgramLanguage {
        slug: "cpp",
        name: "C++",
        aliases: &["cpp", "c++", "cplusplus"],
        code_fence: "cpp",
        execution: ProgramExecution {
            status: ExecutionStatus::Unavailable,
            environment: "C++ toolchain is not configured in this repository runtime",
            check_command: Some("g++ main.cpp -o main"),
            run_command: "./main",
            notes: "The C++ seed is returned with this warning until a g++-backed execution profile is available.",
        },
        source: "local Links Notation write-program seed",
        save_as: "main.cpp",
        setup_hint: "a C++ compiler such as g++ from https://gcc.gnu.org/ or your package manager",
    },
    ProgramLanguage {
        slug: "java",
        name: "Java",
        aliases: &["java", "джава"],
        code_fence: "java",
        execution: ProgramExecution {
            status: ExecutionStatus::Unavailable,
            environment: "Java toolchain is not configured in this repository runtime",
            check_command: Some("javac Main.java"),
            run_command: "java Main",
            notes: "The Java seed is returned with this warning until a javac-backed execution profile is available.",
        },
        source: "local Links Notation write-program seed",
        save_as: "Main.java",
        setup_hint: "a JDK from https://adoptium.net/",
    },
    ProgramLanguage {
        slug: "csharp",
        name: "C#",
        aliases: &["csharp", "c#", "cs", "dotnet"],
        code_fence: "csharp",
        execution: ProgramExecution {
            status: ExecutionStatus::Unavailable,
            environment: "C# / dotnet toolchain is not configured in this repository runtime",
            check_command: Some("dotnet build"),
            run_command: "dotnet run",
            notes: "The C# seed is returned with this warning until a dotnet-backed execution profile is available.",
        },
        source: "local Links Notation write-program seed",
        save_as: "Program.cs",
        setup_hint: "the .NET SDK from https://dotnet.microsoft.com/download",
    },
    ProgramLanguage {
        slug: "ruby",
        name: "Ruby",
        aliases: &["ruby", "rb", "руби"],
        code_fence: "ruby",
        execution: ProgramExecution {
            status: ExecutionStatus::Unavailable,
            environment: "Ruby interpreter is not configured in this repository runtime",
            check_command: Some("ruby -c main.rb"),
            run_command: "ruby main.rb",
            notes: "The Ruby seed is returned with this warning until a ruby-backed execution profile is available.",
        },
        source: "local Links Notation write-program seed",
        save_as: "main.rb",
        setup_hint: "Ruby from https://www.ruby-lang.org/en/downloads/",
    },
];