#imgui #node #bindings #ui #imgui-rs #editor-context

sys imnodes-sys

Raw FFI bindings to imnodes

7 releases (4 breaking)

Uses new Rust 2024

0.5.0 May 4, 2025
0.4.0 Dec 10, 2024
0.3.0 Oct 23, 2024
0.2.2 Jan 14, 2024
0.1.0 Apr 19, 2023

#2356 in GUI

Download history

457 downloads per month
Used in imnodes

MIT/Apache

5.5MB
11K SLoC

C++ 4K SLoC // 0.1% comments PowerShell 3K SLoC // 0.3% comments Lua 2.5K SLoC // 0.0% comments Python 587 SLoC // 0.2% comments Rust 567 SLoC // 0.0% comments Perl 430 SLoC // 0.1% comments Shell 352 SLoC // 0.2% comments Batch 36 SLoC // 0.3% comments C 27 SLoC // 0.6% comments BASH 10 SLoC // 0.3% comments Zsh 7 SLoC Bitbake 1 SLoC

Contains (DOS exe, 24KB) tls12-download-arm64.exe, (DOS exe, 23KB) tls12-download.exe

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

Dependencies

~12MB
~216K SLoC