Skip to content

v0.13.0

Choose a tag to compare

@github-actions github-actions released this 15 May 09:57
· 211 commits to main since this release

This release upgrades the Dear ImGui stack, removes the normal-build dependency
on LLVM/libclang, adds native imgui-node-editor bindings, and continues the
safe API hardening work started in the previous releases. The detailed
v0.12.0..HEAD history is grouped below by user-visible effect rather than by
individual validation commit.

Highlights

  • Upgrade the core stack to Dear ImGui v1.92.8 (docking) and refresh the
    extension sys crates against the same baseline.
  • Normal source builds now use checked-in pregenerated bindings by default.
    LLVM/libclang is only needed when explicitly regenerating bindings with
    DEAR_IMGUI_RS_REGEN_BINDINGS=1 --features bindgen.
  • Add native-only dear-node-editor / dear-node-editor-sys support backed by
    cimnodes_editor / imgui-node-editor, including examples modeled after the
    upstream basic-interaction and blueprints-style demos.
  • Add the stack layout compatibility path required by node-editor blueprints and
    expose safe begin_horizontal, begin_vertical, and spring helpers.
  • Harden the safe API across texture ownership, input text buffers, draw-list
    cloning, table/docking/widget preconditions, callback lifetimes, and
    multi-context ownership.
  • Fix multi-context and multi-viewport backend paths so Winit/WGPU/Glow/Ash
    state, callbacks, and teardown target the intended ImGui context.

Breaking Changes

  • Core (dear-imgui-rs)
    • User texture registration now tracks OwnedTextureData lifetimes from the
      safe API. Raw TextureData registration moved to explicit unsafe raw
      helpers.
    • Font atlas/config loader setters require &'static FontLoader, and
      FontConfig::glyph_exclude_ranges(...) now accepts inclusive (start, end)
      ranges matching Dear ImGui's upstream contract.
    • Infallible TextureId conversions into usize or raw pointers were
      removed. Use try_as_usize(), try_as_ptr(), or try_as_mut_ptr().
    • The duplicate read-only draw-list snapshot types in draw were removed;
      use the unified render draw-data types instead.
    • WindowFlags::DOCK_NODE_HOST was removed because Dear ImGui treats it as an
      internal Begin/NewFrame flag.
    • TextCallbackData is now bound to the input-text callback frame lifetime so
      callback handlers cannot retain it after Dear ImGui returns.
    • PlatformIo aggregate-return callbacks now use out-parameters, and typed
      callback setters must be installed on the active context's PlatformIo.
      Cross-context installation panics instead of splitting the C callback table
      from Rust callback storage.
    • Viewport::flags() / set_flags(...) now use typed ViewportFlags.
      Backend code that must manipulate raw bits should use raw_flags() or
      unsafe set_raw_flags_unchecked(...).
    • WindowClass now carries typed viewport, tab item, dock node, and platform
      icon fields. Struct literals should add the new fields or switch to
      WindowClass::new / Default.
    • set_item_key_owner{,_with_flags} now returns Dear ImGui's ownership-request
      result, matching Dear ImGui v1.92.8.
    • DrawCmd gained SetSamplerLinear and SetSamplerNearest; exhaustive
      draw-command matches must handle the new variants.
  • Core (dear-imgui-sys)
    • Stop exposing cimgui's ImGuiPlatformIO_Set_Platform_GetWindowPos and
      ImGuiPlatformIO_Set_Platform_GetWindowSize helpers from generated bindings.
      Use the repository-owned *_OutParam wrappers instead; they do not consume
      BackendLanguageUserData.
  • Backends
    • Change dear-imgui-winit::multi_viewport::shutdown_multi_viewport_support
      to take &mut Context, matching the renderer backends and making shutdown
      target an explicit ImGui context.
  • Extensions
    • Change dear-implot::PlotContext::current() to an explicit unsafe
      non-owning wrapper. Code that owns an ImPlot context should use
      PlotContext::create(...); callers that borrow a raw current context must
      acknowledge the raw lifetime and ownership contract.
    • Change dear-implot APIs that accept arbitrary ImPlot axes to use typed
      Axis / YAxis values instead of raw i32 indices. Raw-axis calls remain
      available through explicit unsafe *_unchecked escape hatches.

Added

  • Extensions
    • Add native-only dear-node-editor and dear-node-editor-sys support backed
      by cimnodes_editor / imgui-node-editor.
    • Add safe node-editor APIs for editor contexts, typed config/style values,
      node/pin/link scopes, create/delete sessions, selection mutation, queries,
      selection/action-context counts, group hints, node background draw lists,
      shortcut toggles, styled create/reject feedback, and RAII-scoped editor
      suspension.
    • Add node_editor_basic, a compact Winit + WGPU example modeled after the
      upstream basic-interaction example.
    • Add node_editor_showcase, a blueprints-style Winit + WGPU example using
      the stack layout helpers and a Rust BlueprintNodeBuilder.
    • Expose new ImGuizmo handle/move-type queries and custom grid/axis drawing
      helpers through MoveType, GizmoUi::active_handle_type,
      hovered_handle_type, active_move_type, hovered_move_type,
      draw_axes, draw_grid_custom, and draw_grid_custom_color.
  • Core (dear-imgui-sys)
    • Add the native stack layout compatibility layer required by the node-editor
      blueprints example, including repository-owned dear_imgui_stack_* C ABI
      symbols and build-time ItemSize() / ItemAdd() hooks in the generated
      imgui.cpp build copy.
  • Core (dear-imgui-rs)
    • Add stack layout helpers used by the node-editor blueprints showcase:
      begin_horizontal, begin_vertical, and spring.
    • Add RAII-scoped helpers for button-repeat and draw-list texture stacks:
      Ui::push_button_repeat_token, Ui::with_button_repeat,
      DrawListMut::push_texture_token, and DrawListMut::with_texture.
    • Expose Dear ImGui v1.92.8 style additions:
      StyleColor::CheckboxSelectedBg, StyleVar::DragDropTargetRounding,
      Style::drag_drop_target_rounding, drag_drop_target_border_size,
      drag_drop_target_padding, and color_marker_size.
    • Expose additional Style accessors and StyleVar variants for scrollbar
      padding, image borders, tab sizing/borders, angled table headers, tree-line
      styling, separator text styling, and docking separator size.
    • Expose Dear ImGui v1.92.8 draw-list helpers DrawListMut::add_line_h and
      DrawListMut::add_line_v.
    • Expose raw PlatformIo accessors for standard draw callbacks:
      DrawCallback_ResetRenderState, DrawCallback_SetSamplerLinear, and
      DrawCallback_SetSamplerNearest.

Changed

  • Workspace
    • Refresh dear-implot-sys, dear-implot3d-sys, dear-imnodes-sys,
      dear-imguizmo-sys, dear-imguizmo-quat-sys, and
      dear-imgui-test-engine-sys submodules and pregenerated native/WASM
      bindings against the Dear ImGui v1.92.8 stack.
  • Core (dear-imgui-rs)
    • Upgrade the core Dear ImGui/cimgui baseline to Dear ImGui v1.92.8 (docking).
    • Store typed PlatformIo callbacks per active ImGuiContext instead of in
      process-wide Rust slots, while preserving the dear-imgui-sys
      out-parameter shim path for aggregate-return callbacks.
    • Track DrawListMut borrows per raw ImDrawList* on the current thread
      instead of using process-wide locks, and resolve background/foreground draw
      lists against the main viewport.
    • Make DrawListMut::clone_output() return render::OwnedDrawList.
  • Core (dear-imgui-sys)
    • Use checked-in pregenerated bindings by default for normal source builds, so
      users can build without installing LLVM/libclang unless they explicitly
      regenerate bindings. Fixes #28, thanks @dtugend.
    • Make the bindgen build dependency optional behind a bindgen feature.
      Binding regeneration now requires both DEAR_IMGUI_RS_REGEN_BINDINGS=1 and
      --features bindgen.
    • Compile the stack layout compatibility hooks by default for normal native
      builds, and reject older prebuilts unless their manifest declares
      features=stack-layout.
  • Extensions
    • Use checked-in pregenerated bindings by default for extension *-sys normal
      builds, and make their bindgen build dependencies optional behind
      bindgen features.
    • Clarify dear-imguizmo-quat global static setting semantics and add
      GizmoQuatSettings / GizmoQuatSettingsToken for temporary restoration of
      getter-backed sensitivity, scale, flip, and reverse settings.
  • Backends
    • Register Dear ImGui v1.92.8 standard reset/sampler draw callbacks in the
      WGPU and Glow renderers. WGPU now keeps both linear and nearest sampler bind
      groups; Glow switches texture filtering when sampler callbacks are
      encountered.
    • Route Winit multi-viewport aggregate-return callbacks through the
      out-parameter shim path and bind setup, event routing, shutdown, and callback
      cleanup to the provided Context.

Fixed

  • Core (dear-imgui-rs)
    • Expand FFI precondition validation across textures, fonts, draw lists,
      tables, legacy columns, docking, windows, child windows, widgets, popups,
      combos, tabs, color editors, sliders, drags, scalar arrays, drag/drop
      payloads, IO values, style values, hover/focus flags, viewport flags, and
      runtime geometry. Invalid values are rejected in safe Rust before reaching
      Dear ImGui assertions or unchecked indexing paths.
    • Expose child-window builder, token, and ChildFlags through public
      dear_imgui_rs::* paths so Ui::child_window(...).child_flags(...) is
      usable from downstream crates. Fixes #29, thanks @CoffeeCatRailway.
    • Add missing public ConfigFlags, BackendFlags, and TreeNodeFlags bits,
      including ConfigFlags::NO_KEYBOARD,
      BackendFlags::HAS_PARENT_VIEWPORT, tree-line flags, and span/overlap tree
      aliases; align TreeNodeFlags::COLLAPSING_HEADER with Dear ImGui's
      upstream flag combination.
    • Make image builder tint and border colors take effect on Dear ImGui v1.92
      by routing tinted images through ImageWithBg and applying temporary image
      border style overrides.
    • Keep texture registration, Context, and OwnedTextureData lifetimes tied
      together so safe Rust cannot produce dangling texture FFI calls.
    • Harden String / ImString input buffers and input-text callback data,
      including invalid UTF-8 repair, initialized-length tracking, default
      character-filter behavior, cursor/selection validation, and callback-frame
      lifetimes.
    • Reject safe draw-list and draw-data cloning when command buffers contain
      user callbacks, avoiding duplicated opaque callback userdata pointers.
    • Keep multi-select scopes, table draw channels, draw-list channels, font
      stacks, clip-rect stacks, texture stacks, button-repeat state, wrapped text,
      and temporary context binding paths balanced during panic unwinding.
    • Resolve context-owned IO, font atlas, style, viewport, platform-window,
      font-stack, ini settings, clipboard, and PlatformIo operations through the
      receiver context instead of whichever context is currently bound.
    • Reject frame lifecycle calls on a non-current Context, preventing
      frame, render, or draw_data from accidentally operating on a different
      active context.
    • Clear typed PlatformIo, renderer callback, and out-parameter shim storage
      from the receiver context, and clear stale typed slots when raw setters
      replace the corresponding C callbacks.
    • Generate correctly terminated glyph exclude range arrays and reject reversed
      or out-of-range glyph ranges.
  • Core (dear-imgui-sys)
    • Regenerate native and WASM pregenerated bindings for Dear ImGui v1.92.8 via
      cimgui docking_inter.
    • Route Rust-owned Platform_GetWindowPos / Platform_GetWindowSize
      out-parameter shims through dear-imgui-sys storage instead of cimgui's
      BackendLanguageUserData helper, avoiding collisions with language/backend
      userdata.
    • Avoid unresolved PlatformIO out-parameter shim symbols in builds that
      intentionally skip native C++ hook compilation, while keeping callback
      installation available for normal native builds.
    • Report unavailable PlatformIO out-parameter hooks through a capability flag
      and explicit callback-installation panic instead of leaving raw external
      symbols unresolved.
  • Backends
    • Fix WGPU window-handle handling and SDL3 close-event behavior.
    • Make Winit multi-viewport main viewport initialization idempotent and guard
      PlatformUserData access so the backend does not overwrite or read another
      backend's data.
    • Resolve Winit IME userdata through the ImGuiContext* passed to
      Platform_SetImeDataFn, preventing cross-context IME userdata lookups.
    • Bind WGPU multi-viewport renderer callback installation and teardown to the
      provided Context in both the Winit and SDL3 backends.
    • Add explicit-context WGPU render entry points and clear temporary
      PlatformIO.Renderer_RenderState through RAII so draw callbacks do not see
      stale renderer state after early render errors.
    • Keep WGPU, Glow, and Ash multi-viewport renderer/global state per ImGui
      context instead of in process-wide slots.
  • Extensions
    • Reject invalid dear-implot axis indices, non-finite plot
      sizes/coordinates, invalid axis limits, invalid tick ranges, and invalid
      zoom constraints before safe Rust crosses into ImPlot FFI.
    • Require dear-imguizmo IdToken to be dropped while its original ImGui
      context is current, preventing the token from silently switching Dear
      ImGui's global current context during cleanup.
    • Bind dear-implot PlotUi and PlotToken operations to the PlotContext
      and ImGui context that created them, preventing multi-context applications
      from accidentally plotting through whichever ImPlot context is current.
    • Treat dear-implot::PlotContext::current() as non-owning so dropping the
      wrapper cannot destroy the process current ImPlot context.
    • Bind dear-implot3d per-frame plotting APIs to the Plot3DContext and
      ImGui context that created them, preventing multi-context applications from
      accidentally plotting through whichever ImPlot3D context is current.
    • Bind dear-imnodes frame/token operations to the active ImGui context and
      restore the previous Dear ImGui and ImNodes current contexts after
      context/editor cleanup, preventing hidden current-context switches during
      multi-context use.
    • Reset dear-imnodes to the default editor context when NodeEditor is
      opened without an explicit EditorContext or when the current explicit
      editor is dropped, preventing stale editor pointers after using a custom
      editor.