# Auto-generated Julia wrapper for RustTest
# Generated: 2026-03-10 00:26:15
# 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

# =============================================================================
# STRUCTS & OPAQUE TYPES
# =============================================================================

struct TryReserveErrorKind
    CapacityOverflow::Cvoid
    AllocError::Cvoid
end

struct _i32_
    data_ptr::Cvoid
    length::Cvoid
end

struct Result_core_ptr_non_null_NonNull_u8_core_alloc_AllocError_
    Ok::Cvoid
    Err::Cvoid
end

struct NulError
    _0::Cvoid
    _1::Cvoid
end

struct Formatter
    options::Cvoid
    buf::Cvoid
end

struct Counter
    value::Cvoid
end

struct Result_core_ptr_non_null_NonNull_u8_core_alloc_AllocError_
    Ok::Cvoid
    Err::Cvoid
end

struct Count
    _0::Cvoid
end

struct _closure_env_0_
    _ref_args::Cvoid
end

struct Result_alloc_ffi_c_str_CString_alloc_ffi_c_str_NulError_
    Ok::Cvoid
    Err::Cvoid
end

struct _core_ffi_c_str_CStr
    data_ptr::Cvoid
    length::Cvoid
end

struct CStr
    inner::Cvoid
end

struct _mut_dyn_core_fmt_Write
    pointer::Cvoid
    vtable::Cvoid
end

struct Placeholder
    value::Cvoid
    formatter::Cvoid
    _lifetime::Cvoid
end

struct Unique_RustTest_Counter_
    pointer::Cvoid
    _marker::Cvoid
end

struct _mut_u8_
    data_ptr::Cvoid
    length::Cvoid
end

struct NonNull_i32_
    pointer::Cvoid
end

struct _usize_as_core_fmt_Debug_vtable_type_
    drop_in_place::Cvoid
    size::Cvoid
    align::Cvoid
    _method3::Cvoid
end

struct RawVecInner_alloc_alloc_Global_
    ptr::Cvoid
    cap::Cvoid
    alloc::Cvoid
end

struct Err
    _0::Cvoid
end

struct Arguments
    template::Cvoid
    args::Cvoid
end

struct Ok
    _0::Cvoid
end

struct NonNull_i32_
    pointer::Cvoid
end

struct Iter_i32_
    ptr::Cvoid
    end_or_len::Cvoid
    _marker::Cvoid
end

struct Rect
    origin::Cvoid
    size::Cvoid
end

struct Vec_u8_alloc_alloc_Global_
    buf::Cvoid
    len::Cvoid
end

struct Unique_u8_
    pointer::Cvoid
    _marker::Cvoid
end

struct Result_core_fmt_Error_
    Ok::Cvoid
    Err::Cvoid
end

struct Result_str_core_str_error_Utf8Error_
    Ok::Cvoid
    Err::Cvoid
end

struct NonZero_usize_
    _0::Cvoid
end

struct Option_core_ptr_non_null_NonNull_u8_
    None::Cvoid
    Some::Cvoid
end

struct _closure_env_0_i32_i64_i64_RustTest_sum_array_closure_env_0_core_iter_traits_accum_impl_16_sum_closure_env_0_core_iter_adapters_map_Map_core_slice_iter_Iter_i32_RustTest_sum_array_closure_env_0_
    g::Cvoid
    f::Cvoid
end

struct Some
    _0::Cvoid
end

struct _alloc_ffi_c_str_NulError_as_core_fmt_Debug_vtable_type_
    drop_in_place::Cvoid
    size::Cvoid
    align::Cvoid
    _method3::Cvoid
end

struct _const_u8_
    data_ptr::Cvoid
    length::Cvoid
end

struct _str
    data_ptr::Cvoid
    length::Cvoid
end

struct _alloc_vec_Vec_u8_alloc_alloc_Global_as_core_fmt_Debug_vtable_type_
    drop_in_place::Cvoid
    size::Cvoid
    align::Cvoid
    _method3::Cvoid
end

struct FormattingOptions
    flags::Cvoid
    width::Cvoid
    precision::Cvoid
end

struct Option_u8_
    None::Cvoid
    Some::Cvoid
end

struct TryReserveError
    kind::Cvoid
end

struct RawVec_u8_alloc_alloc_Global_
    inner::Cvoid
    _marker::Cvoid
end

struct Continue_
    _0::Cvoid
end

struct NonNull_str_
    pointer::Cvoid
end

struct _const_i32_
    data_ptr::Cvoid
    length::Cvoid
end

struct Option_str_
    None::Cvoid
    Some::Cvoid
end

struct NonNull_u8_
    pointer::Cvoid
end

struct NonNull_u8_
    pointer::Cvoid
end

struct NonNull_
    pointer::Cvoid
end

struct _const_str
    data_ptr::Cvoid
    length::Cvoid
end

struct AllocError
    layout::Cvoid
    non_exhaustive::Cvoid
end

struct NonZeroUsizeInner
    _0::Cvoid
end

struct CString
    inner::Cvoid
end

struct Map_core_slice_iter_Iter_i32_RustTest_sum_array_closure_env_0_
    iter::Cvoid
    f::Cvoid
end

struct Utf8Error
    valid_up_to::Cvoid
    error_len::Cvoid
end

struct Result_core_convert_Infallible_core_alloc_AllocError_
    Ok::Cvoid
    Err::Cvoid
end

struct Break_
    _0::Cvoid
end

struct String
    vec::Cvoid
end

struct _str_
    _0::Cvoid
end

struct alloc_boxed_Box_u8_alloc_alloc_Global_
    data_ptr::Cvoid
    length::Cvoid
end

struct Unique_u8_
    pointer::Cvoid
    _marker::Cvoid
end

struct Argument
    ty::Cvoid
end

struct _str_
    _0::Cvoid
end

struct Option_usize_
    None::Cvoid
    Some::Cvoid
end

struct UsizeNoHighBit
    _0::Cvoid
end

struct NonNull_RustTest_Counter_
    pointer::Cvoid
end

struct Alignment
    _0::Cvoid
end

struct NonNull_core_fmt_rt_Argument_
    pointer::Cvoid
end

struct Point
    x::Cvoid
    y::Cvoid
end

struct _u8_
    data_ptr::Cvoid
    length::Cvoid
end

struct _usize_bool_
    _0::Cvoid
    _1::Cvoid
end

struct Location
    filename::Cvoid
    line::Cvoid
    col::Cvoid
    _filename::Cvoid
end

struct Layout
    size::Cvoid
    align::Cvoid
end

struct ArgumentType
    Placeholder::Cvoid
    Count::Cvoid
end

struct ControlFlow_core_result_Result_core_convert_Infallible_core_alloc_AllocError_core_ptr_non_null_NonNull_u8_
    Continue_::Cvoid
    Break_::Cvoid
end

# =============================================================================
# ENUMS
# =============================================================================

# =============================================================================
# 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 TryReserveErrorKind, _i32_, Result_core_ptr_non_null_NonNull_u8_core_alloc_AllocError_, NulError, Formatter, Counter, Count, _closure_env_0_, Result_alloc_ffi_c_str_CString_alloc_ffi_c_str_NulError_, _core_ffi_c_str_CStr, CStr, _mut_dyn_core_fmt_Write, Placeholder, Unique_RustTest_Counter_, _mut_u8_, NonNull_i32_, _usize_as_core_fmt_Debug_vtable_type_, RawVecInner_alloc_alloc_Global_, Err, Arguments, Ok, Iter_i32_, Rect, Vec_u8_alloc_alloc_Global_, Unique_u8_, Result_core_fmt_Error_, Result_str_core_str_error_Utf8Error_, NonZero_usize_, Option_core_ptr_non_null_NonNull_u8_, _closure_env_0_i32_i64_i64_RustTest_sum_array_closure_env_0_core_iter_traits_accum_impl_16_sum_closure_env_0_core_iter_adapters_map_Map_core_slice_iter_Iter_i32_RustTest_sum_array_closure_env_0_, Some, _alloc_ffi_c_str_NulError_as_core_fmt_Debug_vtable_type_, _const_u8_, _str, _alloc_vec_Vec_u8_alloc_alloc_Global_as_core_fmt_Debug_vtable_type_, FormattingOptions, Option_u8_, TryReserveError, RawVec_u8_alloc_alloc_Global_, Continue_, NonNull_str_, _const_i32_, Option_str_, NonNull_u8_, NonNull_, _const_str, AllocError, NonZeroUsizeInner, CString, Map_core_slice_iter_Iter_i32_RustTest_sum_array_closure_env_0_, Utf8Error, Result_core_convert_Infallible_core_alloc_AllocError_, Break_, String, _str_, alloc_boxed_Box_u8_alloc_alloc_Global_, Argument, Option_usize_, UsizeNoHighBit, NonNull_RustTest_Counter_, Alignment, NonNull_core_fmt_rt_Argument_, Point, _u8_, _usize_bool_, Location, Layout, ArgumentType, ControlFlow_core_result_Result_core_convert_Infallible_core_alloc_AllocError_core_ptr_non_null_NonNull_u8_, 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
