{"id":50300377,"url":"https://github.com/waldyrious/rust-debug2json","last_synced_at":"2026-05-28T12:34:02.246Z","repository":{"id":354706479,"uuid":"1221070326","full_name":"waldyrious/rust-debug2json","owner":"waldyrious","description":"Small browser-based utility to convert Rust Debug output to pretty-printed JSON","archived":false,"fork":false,"pushed_at":"2026-04-29T17:05:33.000Z","size":452,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-29T19:08:41.524Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waldyrious.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"waldyrious","liberapay":"waldyrious","custom":["https://paypal.me/waldyrious"]}},"created_at":"2026-04-25T18:00:48.000Z","updated_at":"2026-04-29T17:05:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/waldyrious/rust-debug2json","commit_stats":null,"previous_names":["waldyrious/rust-debug2json"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/waldyrious/rust-debug2json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldyrious%2Frust-debug2json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldyrious%2Frust-debug2json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldyrious%2Frust-debug2json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldyrious%2Frust-debug2json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waldyrious","download_url":"https://codeload.github.com/waldyrious/rust-debug2json/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldyrious%2Frust-debug2json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33609237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-28T12:34:01.456Z","updated_at":"2026-05-28T12:34:02.235Z","avatar_url":"https://github.com/waldyrious.png","language":"JavaScript","funding_links":["https://github.com/sponsors/waldyrious","https://liberapay.com/waldyrious","https://paypal.me/waldyrious"],"categories":[],"sub_categories":[],"readme":"# rust-debug2json\n\nA small browser-based utility\nthat converts Rust [`Debug`][debug-trait] output\nto pretty-printed JSON.\n\nIt relies on [`serde_dbgfmt`][serde-dbgfmt] for the parsing,\nand compiles to a [WebAssembly](https://webassembly.org) module\nthat is imported via JavaScript into a plain HTML file, for browser usage.\n\n[debug-trait]: https://doc.rust-lang.org/std/fmt/trait.Debug.html\n[serde-dbgfmt]: https://docs.rs/serde_dbgfmt\n\n## Project files overview\n\n**Core application files**\u003cbr/\u003e\n\u0026ensp;🔧 `src/lib.rs` — Rust library: the core parsing and conversion logic\u003cbr/\u003e\n\u0026ensp;📦 `pkg/rust_debug2json_bg.wasm` — WebAssembly binary compiled from the Rust library\u003cbr/\u003e\n\u0026ensp;🔗 `pkg/rust_debug2json.js` — Generated JavaScript glue code for the WebAssembly module\u003cbr/\u003e\n\u0026ensp;🖥️  `index.html` — Main HTML page containing the converter interface\u003cbr/\u003e\n\n**Docs \u0026 metadata**\u003cbr/\u003e\n\u0026ensp;📖 `README.md` — Project documentation (this file)\u003cbr/\u003e\n\u0026ensp;⚖️ `LICENSE.md` — Simple Public License 2.0 text\u003cbr/\u003e\n\u0026ensp;📋 `Cargo.toml` — Rust package manifest and dependencies\u003cbr/\u003e\n\u0026ensp;🔒 `Cargo.lock` — Pinned dependency versions\u003cbr/\u003e\n\n**Config \u0026 automation**\u003cbr/\u003e\n\u0026ensp;⚙️ `.github/workflows/ci.yml` — GitHub Actions CI workflow (runs `cargo test`)\u003cbr/\u003e\n\u0026ensp;🚫 `.gitignore` — Git ignore rules\u003cbr/\u003e\n\n## Usage\n\nVisit \u003chttps://waldyrious.github.io/rust-debug2json\u003e,\npaste your Rust debug output into the left pane,\nand click the **Convert to JSON** button.\n\nFor local usage, clone the repository\nand [build the project](#building-from-source),\nthen open `index.html` via a local server\n(required for the WebAssembly module to load).\n\n## Caveats\n\nThis tool works best with standard Rust `Debug` output\n— i.e. the format emitted by the [`#[derive(Debug)]`][debug-trait] trait.\nCustom `Debug` implementations may produce output that doesn't parse correctly.\n\nA few things to be aware of about how the output maps to JSON:\n\n- Wrapper types like `String(\"...\")` and `Some(...)`\n  become single-element arrays in the output, e.g. `[\"value\"]`.\n  This is due to how `serde_dbgfmt` deserializes them\n  into a generic [`serde_json::Value`][serde-json-value].\n- `Object { \"key\": ... }` wrappers\n  (which appear in debug output from `serde_json::Value` itself)\n  are automatically stripped before parsing,\n  so their contents appear as plain JSON objects.\n\n[serde-json-value]: https://docs.rs/serde_json/latest/serde_json/enum.Value.html\n\n## Building from source\n\nTo build this locally, ensure you have [Rust](https://rust-lang.org)\nand [`wasm-pack`](https://rustwasm.github.io/wasm-pack/) installed.\nNote that Rust must be installed via [rustup](https://rustup.rs),\nnot via Homebrew or a system package manager,\nsince `wasm-pack` relies on it to manage the WebAssembly compile target.\n\n1. Set up a Rust toolchain via rustup:\n\n   ```sh\n   curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n   ```\n\n2. Install `wasm-pack` to allow compiling Rust to WebAssembly:\n\n   ```sh\n   cargo install wasm-pack\n   ```\n\n3. Compile the library source code at `src/lib.rs` into WebAssembly module:\n\n   ```sh\n   wasm-pack build --target web\n   ```\n\n   This generates the `pkg/` directory, which is loaded by `index.html` at runtime.\n\n4. Serve the repository root with any static HTTP server\n   (browsers require HTTP, not a `file://` URL, for WebAssembly modules to load).\n   For example, using Python's HTTP server module:\n\n   ```sh\n   python3 -m http.server\n   ```\n\n   Then open http://localhost:8000 in your browser.\n\n## Developing\n\nContributions are welcome! This project is [licensed](./LICENSE.md) as free software\nunder the Simple Public License 2.0 (SPDX: `SimPL-2.0`).\n\nIf you make changes to the Rust code, make sure to adapt the tests, and run them with:\n\n```sh\ncargo test\n```\n\nIf the new code compiles and the tests pass, rebuild the WebAssebly as per step 3 above,\nand commit the updated `pkg/rust_debug2json.js` and `pkg/rust_debug2json_bg.wasm` files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaldyrious%2Frust-debug2json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaldyrious%2Frust-debug2json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaldyrious%2Frust-debug2json/lists"}