Skip to content

[Tracking] Migrate dedx_web wasm/dedx_extra.c helpers upstream into libdedx #118

@grzanka

Description

@grzanka

Summary

The web frontend (APTG/dedx_web) carries ~810 LOC of C in wasm/dedx_extra.c that sits on top of libdedx because the upstream public API does not yet expose what a GUI needs. This tracking issue coordinates moving that proven code upstream so libdedx gains a GUI-friendly API, downstream duplication is removed, and the WASM build links a clean vendored libdedx with no local C patches.

Full design: docs/12-libdedx-migration-plan.md in dedx_web (per-symbol inventory + phased plan).

Why this matters

  • Duplication / drift — the material display-name table exists twice (C dedx_get_material_friendly_name and TS src/lib/config/material-names.ts, 151 entries each).
  • A bug fix stranded downstreamdedx_extra.c contains a corrected inverse-stopping-power branch selection that works around a real bug in upstream dedx_get_inverse_stp(); every other consumer (CLI, Python, openshieldhit) still hits the original bug.
  • Re-exported internals — four accessors just publish dedx_internal_* functions that already exist in libdedx but lack a public header entry.

Relationship to existing issues

This is the C-API-surface counterpart to the ecosystem work in the health review #108 (which calls for the Python binding to expose inverse/custom-compound functionality, and lists the GUI query API). It does not duplicate:

Phases (each a self-contained, independently releasable PR)

Suggested order: A (#119) and F (#79) first (smallest, unblock the GUI), then C (#121, highest physics value), then B (#120), then D (#122) → E (#123).


Filed via Claude Code as part of the dedx_extra.c → libdedx migration plan.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions