[package]
name = "mech-set"
version = "0.3.2"
authors = ["Corey Montella <corey@mech-lang.org>", "Steven McPhillimey <slm526@lehigh.edu>", "Liam Messinger <ljm426@lehigh.edu>", "Natalie Dumler <nad326@lehigh.edu>"]
description = "Set library for the Mech language"
documentation = "http://docs.mech-lang.org"
homepage = "http://mech-lang.org"
repository = "https://github.com/mech-machines/set"
keywords = ["mech", "language", "programming"]
license = "Apache-2.0"
readme = "README.md"
edition = "2024"

[badges]
gitlab = { repository = "mech-lang/machines/set", branch = "main" }
maintenance = { status = "actively-developed" }

[lib]
crate-type = ["dylib", "rlib"]

[features]
no_std = ["mech-core/no_std"]

default = ["baselib", "pretty_print", "serde", "compiler", "program",
           "u8", "u16", "u32", "u64", "u128", 
           "i8", "i16", "i32", "i64", "i128", 
           "f32", "f64", "c64", "r64", 
           "bool", "string",
           "set_default",
           "statements_default", "subscript_default",
           "mech-core/default",
          ]

base = ["baselib", "pretty_print", "serde", "compiler", "program",
        "set_default",
        "statements_default", "subscript_default",
        "mech-core/base",
      ]   
      
baselib = ["bool", "string", 
      "f64", "c64", "r64",
      "set", "map", "table", "tuple", "record", "atom", "enum",
      "row_vectord", "vectord", "matrixd",
      "subscript_range", "logical_indexing", 
      "subscript_formula",
      "variable_define", "variable_assign", 
      "kind_define",
      "kind_annotation", "variables",
      "functions", "formulas",
      "mech-core/baselib"
    ]

membership_default = ["element_of", "not_element_of"]
modify_default = ["insert", "remove"]
operations_default = ["cartesian_product", "difference", "intersection", "powerset", "symmetric_difference", "union"]
relations_default = ["disjoint", "equals", "not_equals", "proper_subset", "proper_superset", "subset", "superset"]
setdata_default = ["size"]

set_default = ["membership_default", "modify_default",
              "operations_default", "relations_default",
              "setdata_default", "comprehensions"]

set = ["functions"]

membership = ["set"]
modify = ["set"]
operations = ["set"]
relations = ["set"]
setdata = ["set"]
comprehensions = ["set"]

element_of = ["membership"]
not_element_of = ["membership"]

insert = ["modify"]
remove = ["modify"]

cartesian_product = ["operations"]
difference = ["operations"]
intersection = ["operations"]
powerset = ["operations"]
symmetric_difference = ["operations"]
union = ["operations"]

disjoint = ["relations"]
equals = ["relations"]
not_equals = ["relations"]
proper_subset = ["relations"]
proper_superset = ["relations"]
subset = ["relations"]
superset = ["relations"]

size = ["setdata"]

statements_default = ["variable_assign","variable_define","kind_define"]
subscript_default = ["subscript_slice", "subscript_range", "logical_indexing", "swizzle", "subscript_formula", "dot_indexing"]

stdlib = ["bool", "string",
          "u8", "u16", "u32", "u64", "u128", 
          "i8", "i16", "i32", "i64", "i128", 
          "f32", "f64", "c64", "r64", 
          "set", "map", "table", "tuple", "record", "atom",
          "matrix1", "matrix2", "matrix3", "matrix4", "matrix2x3", "matrix3x2",
          "row_vector2", "row_vector3", "row_vector4",
          "vector2", "vector3", "vector4",
          "row_vectord", "vectord", "matrixd",
          "subscript_range", "logical_indexing", "swizzle",
          "subscript_formula", "dot_indexing",
          "variable_define", "variable_assign", "kind_define",
          "kind_annotation", "variables",
          "functions", "formulas",
        ]

compiler = ["mech-core/compiler"]
program = ["mech-core/program"]
pretty_print = ["mech-core/pretty_print"]
serde = ["mech-core/serde"]

statements = ["mech-core/statements"]
variables = ["variable_define", "symbol_table", "mech-core/variables"]
variable_define = ["statements", "functions", "mech-core/variable_define"]
variable_assign = ["statements", "mech-core/variable_assign"]
kind_define = ["kind_annotation", "statements", "mech-core/kind_define"]
kind_annotation = ["functions", "mech-core/kind_annotation"]
formulas = ["mech-core/formulas"]
functions = ["symbol_table", "mech-core/functions"]
symbol_table = ["mech-core/symbol_table"]

bool = ["mech-core/bool"]
string = ["mech-core/string"]

# Numbers
numbers = ["mech-core/numbers"]
complex = ["f64", "numbers", "mech-core/complex"]
rational = ["i64", "numbers", "mech-core/rational"]
signed_ints = ["numbers", "mech-core/signed_ints"]
unsigned_ints = ["numbers", "mech-core/unsigned_ints"]
floats = ["numbers", "mech-core/floats"]
u8 = ["unsigned_ints", "mech-core/u8"]
u16 = ["unsigned_ints", "mech-core/u16"]
u32 = ["unsigned_ints", "mech-core/u32"]
u64 = ["unsigned_ints", "mech-core/u64"]
u128 = ["unsigned_ints", "mech-core/u128"]
i8 = ["signed_ints", "mech-core/i8"]
i16 = ["signed_ints", "mech-core/i16"]
i32 = ["signed_ints", "mech-core/i32"]
i64 = ["signed_ints", "mech-core/i64"]
i128 = ["signed_ints", "mech-core/i128"]
f32 = ["floats", "mech-core/f32"]
f64 = ["floats", "mech-core/f64"]
c64 = ["complex", "mech-core/c64"]
r64 = ["rational", "mech-core/r64"]

# Structs
map = ["mech-core/map"]
table = ["vectord", "record", "kind_annotation", "mech-core/table"]
tuple = ["mech-core/tuple"]
enum = ["mech-core/enum"]
record = ["tuple", "kind_annotation", "mech-core/record"]
atom = ["mech-core/atom"]

# Matrix
matrix = ["mech-core/matrix"]
fixed_row_vector = ["row_vector4", "row_vector3", "row_vector2", "mech-core/fixed_row_vector"]
fixed_vector = ["vector4", "vector3", "vector2", "mech-core/fixed_vector"]
fixed_matrix = ["matrix4", "matrix3", "matrix2", "matrix1", "matrix2x3", "matrix3x2", "mech-core/fixed_matrix"]
dynamic_matrix = ["matrixd", "vectord", "row_vectord", "mech-core/dynamic_matrix"]
row_vector4 = ["matrix", "mech-core/row_vector4"]
row_vector3 = ["matrix", "mech-core/row_vector3"]
row_vector2 = ["matrix", "mech-core/row_vector2"]
vector4 = ["matrix", "mech-core/vector4"]
vector3 = ["matrix", "mech-core/vector3"]
vector2 = ["matrix", "mech-core/vector2"]
matrix4 = ["matrix", "mech-core/matrix4"]
matrix3 = ["matrix", "mech-core/matrix3"]
matrix2 = ["matrix", "mech-core/matrix2", "mech-core/matrix"]
matrix1 = ["matrix", "mech-core/matrix1"]
matrix2x3 = ["matrix", "mech-core/matrix2x3"]
matrix3x2 = ["matrix", "mech-core/matrix3x2"]
row_vectord =["matrix",  "mech-core/row_vectord"]
vectord = ["matrix",  "mech-core/vectord"]
matrixd = ["matrix",  "mech-core/matrixd"]

# Subscripts
subscript = ["mech-core/subscript"]
subscript_slice = ["subscript", "vectord", "mech-core/subscript_slice"]
subscript_range = ["subscript_slice","vectord", "mech-core/subscript_range"]
subscript_formula = ["subscript_slice","formulas", "mech-core/subscript_formula"]
logical_indexing = ["subscript","vectord","bool", "mech-core/logical_indexing"]
dot_indexing = ["subscript", "mech-core/dot_indexing"]
swizzle = ["subscript", "mech-core/swizzle"]

[dependencies]
mech-core = {version = "0.3.2", default-features = false}

paste = "1.0.15"
inventory = "0.3.22"
indexmap = "2.13.0"

[workspace]