Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Auto public extern gen #52

Open
tahadostifam opened this issue Feb 21, 2025 · 0 comments
Open

[FEATURE] Auto public extern gen #52

tahadostifam opened this issue Feb 21, 2025 · 0 comments

Comments

@tahadostifam
Copy link
Member

extern fn malloc(size: u64): *void as local_malloc;
extern fn malloc(ptr: *void) as local_free;

pub fn malloc(size: u64): *void {
    return local_malloc(size);
}

pub fn free(ptr: *void) {
    local_free(ptr);
}

Solution:

pub extern fn malloc(size: u64): *void;

It automatically generates another wrapper func that is public...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant