infinyon / infinyon/node-bindgen

JS namespaces (modules)

Open
#185 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
587
Forks
43
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Research direction

No file, test, or entry point is named; begin by locating the existing Node.js module export path and how Rust modules are exposed. Done means determining whether nested features and tools namespaces can be represented in JavaScript, and documenting or implementing the required behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, rust
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.