MCPcopy Index your code
hub / github.com/benmkw/imnodes-rs

github.com/benmkw/imnodes-rs @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
188 symbols 347 edges 16 files 42 documented · 22%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

imnodes-rs

Tests

imnodes imnodes-sys

These are bindings for imnodes using cimnodes for imgui-rs.

They are inspsired by implot-rs.

example image

docs

cargo doc --no-deps --open

TODO/ Ideas

  • add example with salsa or some other incremental computation lib

Example (see imnodes-wgpu-examples/src/hello_world.rs)

pub fn show<'a>(ui: &imgui::Ui, context: &mut imnodes::EditorContext<'a>) {
    let mut id_generator = context.new_identifier_generator();

    imnodes::editor(context, |mut editor| {
        editor.add_node(id_generator.next_node(), |mut node| {
            node.add_titlebar(|| ui.text("simple node :)"));
            node.add_input(
                &imnodes::InputAttributeDesc {
                    id: id_generator.next_input_pin(),
                    shape: imnodes::PinShape::Circle,
                },
                || ui.text("input"),
            );
            node.add_output(
                &imnodes::OutputAttributeDesc {
                    id: id_generator.next_output_pin(),
                    shape: imnodes::PinShape::QuadFilled,
                },
                || ui.text("output"),
            );
        });
    });
}

If you are looking for a pure rust gui node editor: https://github.com/emilk/egui/discussions/166

Extension points exported contracts — how you extend this code

Hoverable (Interface)
Trait implemented by elements that can be hovered over by the mouse. [4 implementers]
src/lib.rs

Core symbols most depended-on inside this repo

next_input_pin
called by 24
src/lib.rs
next_node
called by 22
src/lib.rs
next_output_pin
called by 21
src/lib.rs
set_position
called by 18
src/lib.rs
set_as_current_editor
called by 16
src/context.rs
add_input
called by 12
src/scopes.rs
next_attribute
called by 11
src/lib.rs
add_titlebar
called by 10
src/scopes.rs

Shape

Method 109
Class 54
Function 17
Enum 7
Interface 1

Languages

Rust99%
C++1%

Modules by API surface

src/context.rs41 symbols
src/lib.rs37 symbols
src/scopes.rs33 symbols
src/styling.rs22 symbols
imnodes-wgpu-examples/src/color_editor.rs20 symbols
imnodes-sys/src/bindings.rs9 symbols
imnodes-wgpu-examples/src/save_load.rs8 symbols
imnodes-wgpu-examples/src/multi_editor.rs6 symbols
imnodes-wgpu-examples/src/main.rs6 symbols
imnodes-sys/build.rs2 symbols
imnodes-wgpu-examples/src/hello_world.rs1 symbols
imnodes-sys/third-party/imvec2_c.h1 symbols

For agents

$ claude mcp add imnodes-rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact