Skip to content

JS namespaces (modules) #185

Open
Open

Description

@DmitryAstafyev

Hello,
Is it possible to define somehow module/namespace on JS level?
Let's say I have:

mod features {
    #[node_bindgen]
    pub fn feature_a() -> Result<...> { .... }
}

mod tools {
    #[node_bindgen]
    pub fn tool_a() -> Result<...> { .... }
}

On js level I would like to see it as:

let rustcore = require('rustcore.node');
rustcore.features.feature_a();
rustcore.tools.tool_a();

Sorry if question is trivial, but didn't find any kind of solution for that.

Activity

  1. sehz commented on Apr 13, 2022

    @sehz

    Sorry, not yet. Would love contribution though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions