sensorial-systems / ligen

Apache License 2.0
20 stars 3 forks source link

Bindings being generated for non pub methods #65

Closed arrudagates closed 3 years ago

arrudagates commented 3 years ago

Non pub functions are being generated alongside pub functions example:

#[ligen(c)]
impl Adder {
    fn string_test(a: String) -> String {
        println!("{:#?}", a);
        a
    }
}

has a header entry generated:

#pragma once

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct Struct_Adder {
void* self;
} Adder;

RString Adder_string_test(const char* a);
void Adder_destroy(Adder adder);

#ifdef __cplusplus
}
#endif