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

Future API #9

Open
Vurv78 opened this issue Dec 19, 2021 · 0 comments
Open

Future API #9

Vurv78 opened this issue Dec 19, 2021 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@Vurv78
Copy link
Owner

Vurv78 commented Dec 19, 2021

Maybe Engine, Lua State, etc can be unified into one "Gmod" state object. I don't know the extent of proc-macros but I hope this can happen.

Example clientside binary module

use rglua::prelude::*;

// Either #[rglua::open] or #[rglua::open(interfaces..)]
// In this case, it tries to load the engine interface to add functions like is_connected
// Additionally maybe it can return a result?
#[rglua::open(engine)]
fn start_module(g: Gmod) -> i32 {
    printgm!(g, "{}", g.is_connected());
    0
}

#[rglua::close]
fn close_module(g: Gmod) -> i32 {
    0
}
@Vurv78 Vurv78 added the help wanted Extra attention is needed label Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant