# Auto-generated Julia wrapper for RustTest
# Generated: 2026-03-10 00:22:06
# Generator: RepliBuild Wrapper (Rust Introspective)
# Library: libRustTest.so
# Metadata: compilation_metadata.json

module RustTest

const Cintptr_t = Int
const Cuintptr_t = UInt
const Cssize_t = Int
const Csize_t = UInt

using Libdl
import RepliBuild
import Base: unsafe_convert

const LIBRARY_PATH = "/home/john/Desktop/Projects/RepliBuild.jl/test/rust_test/julia/libRustTest.so"
const THUNKS_LIBRARY_PATH = ""

# Verify library exists
if !isfile(LIBRARY_PATH)
    error("Library not found: $LIBRARY_PATH")
end

# =============================================================================
# FUNCTIONS
# =============================================================================

"""
    add(a, b)

Wrapper for Rust function `add`.
"""
function add(a::Int32, b::Int32)::Int32
    return ccall((:add, LIBRARY_PATH), Int32, (Int32, Int32,), a, b)
end

"""
    color_name(c)

Wrapper for Rust function `color_name`.
"""
function color_name(c::Cint)::Cstring
    return ccall((:color_name, LIBRARY_PATH), Cstring, (Cint,), c)
end

"""
    counter_free(c)

Wrapper for Rust function `counter_free`.
"""
function counter_free(c::Ptr{Counter})::Cvoid
    return ccall((:counter_free, LIBRARY_PATH), Cvoid, (Ptr{Counter},), c)
end

"""
    counter_get(c)

Wrapper for Rust function `counter_get`.
"""
function counter_get(c::Ptr{Counter})::Int64
    return ccall((:counter_get, LIBRARY_PATH), Int64, (Ptr{Counter},), c)
end

"""
    counter_increment(c)

Wrapper for Rust function `counter_increment`.
"""
function counter_increment(c::Ptr{Counter})::Cvoid
    return ccall((:counter_increment, LIBRARY_PATH), Cvoid, (Ptr{Counter},), c)
end

"""
    counter_new(initial)

Wrapper for Rust function `counter_new`.
"""
function counter_new(initial::Int64)::Ptr{Counter}
    return ccall((:counter_new, LIBRARY_PATH), Ptr{Counter}, (Int64,), initial)
end

"""
    free_string(s)

Wrapper for Rust function `free_string`.
"""
function free_string(s::Cstring)::Cvoid
    return ccall((:free_string, LIBRARY_PATH), Cvoid, (Cstring,), s)
end

"""
    greet(name)

Wrapper for Rust function `greet`.
"""
function greet(name::Cstring)::Cstring
    return ccall((:greet, LIBRARY_PATH), Cstring, (Cstring,), name)
end

"""
    is_positive(x)

Wrapper for Rust function `is_positive`.
"""
function is_positive(x::Int32)::Bool
    return ccall((:is_positive, LIBRARY_PATH), Bool, (Int32,), x)
end

"""
    multiply_f64(a, b)

Wrapper for Rust function `multiply_f64`.
"""
function multiply_f64(a::Float64, b::Float64)::Float64
    return ccall((:multiply_f64, LIBRARY_PATH), Float64, (Float64, Float64,), a, b)
end

"""
    point_distance(a, b)

Wrapper for Rust function `point_distance`.
"""
function point_distance(a::Ptr{Point}, b::Ptr{Point})::Float64
    return ccall((:point_distance, LIBRARY_PATH), Float64, (Ptr{Point}, Ptr{Point},), a, b)
end

"""
    point_new(x, y)

Wrapper for Rust function `point_new`.
"""
function point_new(x::Float64, y::Float64)::Point
    return ccall((:point_new, LIBRARY_PATH), Point, (Float64, Float64,), x, y)
end

"""
    rect_area(r)

Wrapper for Rust function `rect_area`.
"""
function rect_area(r::Ptr{Rect})::Float64
    return ccall((:rect_area, LIBRARY_PATH), Float64, (Ptr{Rect},), r)
end

"""
    string_length(s)

Wrapper for Rust function `string_length`.
"""
function string_length(s::Cstring)::Int32
    return ccall((:string_length, LIBRARY_PATH), Int32, (Cstring,), s)
end

"""
    sum_array(data, len)

Wrapper for Rust function `sum_array`.
"""
function sum_array(data::Ptr{Int32}, len::Csize_t)::Int64
    return ccall((:sum_array, LIBRARY_PATH), Int64, (Ptr{Int32}, Csize_t,), data, len)
end

# =============================================================================
# EXPORTS
# =============================================================================

export add, color_name, counter_free, counter_get, counter_increment, counter_new, free_string, greet, is_positive, multiply_f64, point_distance, point_new, rect_area, string_length, sum_array

end # module RustTest
