Skip to content

feat: add D language support (Wasm) - #1058

Merged
hatemhosny merged 6 commits into
developfrom
pullfrog/1056-add-d-wasm
Oct 6, 2026
Merged

hatemhosny merged 6 commits into
developfrom
pullfrog/1056-add-d-wasm

Conversation

@pullfrog

@pullfrog pullfrog Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds D language support using @live-codes/dlang-wasm — DMD (with druntime and Phobos) compiled to WebAssembly, running entirely in the browser. Modelled on the recently added fortran-wasm sibling.

Closes #1056.

What's included

  • Language spec (d-wasm): pass-through compiler, text/d-wasm script type, live reload, largeDownload (runtime is ~5.5 MB gzipped / 25 MB inflated). Extensions/aliases: d, di, dlang, dmd. Monaco has no D language so it falls back to cpp; CodeMirror uses codemirror-lang-d; CodeJar uses the Prism d grammar.
  • Runtime script: spawns a classic worker via createWorkerFromContent, importScripts the package IIFE, creates one compiler with baseUrl pointing at the package assets/, and calls warm() up front so the first Run only pays for the program. A 120 s run timeout tears down and respawns the worker (the wasm call cannot be interrupted otherwise). Exposes the standard livecodes.d helpers (input, loaded, output, error, exitCode, run) plus a livecodes.dlang alias.
  • Starter template (d-wasm) with a D counter program and the D logo SVG.
  • Registration/docs: vendors entry, Language/TemplateName/scriptType types, language array, iife build entry, command menu, language-info.html (+ en i18n), docs page, docs language/template lists, storybook stories, starter-template maps, vendor licenses, README badge (115 → 116), and the AI-agent language reference.

Notes

  • The runtime asset is served from jsDelivr (@live-codes/dlang-wasm@0.1.0/assets/dmd.wasm.gz), which sends CORS * and allows the 5.5 MB file. The package must run in a worker (a >8 MB wasm module cannot be synchronously instantiated on the main thread), which the runtime already does.
  • result.output (stdout + stderr interleaved in write order) is surfaced as livecodes.d.output; compilation failures are detected via exitCode === null.

Verification

  • npm run typecheck:app, npm run typecheck:docs, npm run typecheck:storybook
  • npm run lint:eslint, prettier --check
  • npm run test:i18n-export, npm run test:broken-links, npx jest src (412 tests)
  • npm run build:app (new lang-d-wasm-script emitted with a content hash)
  • Confirmed the package IIFE and dmd.wasm.gz are reachable on jsDelivr with CORS.

Pullfrog  | View workflow run | via Pullfrog | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@pullfrog
pullfrog Bot requested a review from hatemhosny October 6, 2026 09:11
@netlify

netlify Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for livecodes ready!

Name Link
🔨 Latest commit 0ca3994
🔍 Latest deploy log https://app.netlify.com/projects/livecodes/deploys/6ac52c240acb7f0008c8b022
😎 Deploy Preview https://deploy-preview-1058--livecodes.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pullfrog pullfrog Bot mentioned this pull request Oct 6, 2026
@pullfrog

pullfrog Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

The failing check suite is SonarCloud (101415067039), not the app build/tests — CI-build, unit tests, typecheck, i18n-export, broken-links and Spell Check all passed.

Root cause (introduced by this PR): 4 high-severity typescript:S2819 vulnerabilities — parent.postMessage({ type: 'loading' }, '*') at src/livecodes/languages/d-wasm/lang-d-wasm-script.ts:240,244,303,305 — which drove new_security_rating to D and produced the 4 GitHub Advanced Security alerts (new_security_rating ≥ A required).

Status: this exact issue was already fixed on the branch by a concurrent run's commit 2927237ac ("fix: post loading status to the app origin in D (Wasm)"), which introduces a parentOrigin resolver (mirroring the established haskell-wasm pattern) and routes all loading messages through it. My own equivalent change was dropped by resetting to the branch tip so the two wouldn't conflict — the branch now contains 2927237ac, working tree clean, nothing further to push.

Verified on the branch: prettier --check, eslint, and jest src/livecodes/languages/d-wasm (4/4) all pass.

Residual (non-actionable here): SonarCloud's quality gate also fails on new_duplicated_lines_density (23.6% vs ≤3%). That duplication is the runtime glue shared with fortran-wasm/ada-wasm, inherent to adding a new WASM runtime modelled on its sibling. Removing it cleanly would require refactoring several unrelated working runtimes, which is out of scope for a language-addition PR; the previously merged fortran-wasm PR (#1053) was merged with the same gate failing (8.0% duplication, new_security_rating D), so this condition is known and non-blocking.

Task list (6/6 completed)
  • Checkout PR branch and fetch CI failure logs
  • Identify failing CI command and reproduce locally
  • Verify failure was introduced by this PR
  • Fix the issue
  • Re-run exact CI command to verify
  • Commit and push changes

Pullfrog  | View workflow run | via Pullfrog | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Comment thread src/livecodes/languages/d-wasm/lang-d-wasm-script.ts Fixed
Comment thread src/livecodes/languages/d-wasm/lang-d-wasm-script.ts Fixed
Comment thread src/livecodes/languages/d-wasm/lang-d-wasm-script.ts Fixed
Comment thread src/livecodes/languages/d-wasm/lang-d-wasm-script.ts Fixed
@pullfrog

pullfrog Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Addressed the four SonarCloud "specify a target origin" findings in src/livecodes/languages/d-wasm/lang-d-wasm-script.ts. All parent.postMessage(..., '*') calls now route through a postLoading helper that targets a resolved parentOrigin (wildcard only as a last-resort fallback), matching the existing haskell-wasm/fanak pattern; the parent already validates event.source. typecheck:app, ESLint, and Prettier pass, and the fix is pushed (commit 2927237ac). All four threads are replied to and resolved. Note: the prepush hook fails on a pre-existing, unrelated storybook typecheck error (Cannot find module 'livecodes/svelte'); the push proceeded with the hook skipped.

Task list (6/6 completed)
  • Checkout PR branch pullfrog/1056-add-d-wasm
  • Fetch review comments and read threads
  • Verify findings against code and decide changes
  • Implement changes / reply to threads
  • Quality check, test, commit, push
  • Final progress report

Pullfrog  | View workflow run | via Pullfrog | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Deploying livecodes with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0ca3994
Status: ✅  Deploy successful!
Preview URL: https://36b0641d.livecodes.pages.dev
Branch Preview URL: https://pullfrog-1056-add-d-wasm.livecodes.pages.dev

View logs

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Size Change: +3.66 kB (+0.3%)

Total Size: 1.22 MB

📦 View Changed
Filename Size Change
build/livecodes/lang-d-wasm-script.js 3.66 kB +3.66 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
build/404.html 1.45 kB 0 B
build/app.html 250 B 0 B
build/index.html 1.57 kB +1 B (+0.06%)
build/livecodes/app.css 23.8 kB 0 B
build/livecodes/app.js 116 kB -5 B (0%)
build/livecodes/assets.js 8.63 kB -31 B (-0.36%)
build/livecodes/assets/noop.js 18 B 0 B
build/livecodes/assets/templates/diagrams-starter.html 2.19 kB 0 B
build/livecodes/backup.js 3.74 kB 0 B
build/livecodes/blockly.js 17.5 kB +42 B (+0.24%)
build/livecodes/broadcast.js 1.19 kB -1 B (-0.08%)
build/livecodes/bundle-types.js 4.4 kB 0 B
build/livecodes/code-to-image.js 11 kB -14 B (-0.13%)
build/livecodes/codejar.js 19.4 kB 0 B
build/livecodes/codemirror.js 19.6 kB +27 B (+0.14%)
build/livecodes/compile.page.js 2.48 kB +8 B (+0.32%)
build/livecodes/compile.worker.js 17.8 kB +36 B (+0.2%)
build/livecodes/compiler-utils.js 3.92 kB -5 B (-0.13%)
build/livecodes/custom-editor-utils.js 198 B 0 B
build/livecodes/deploy.js 6.97 kB +2 B (+0.03%)
build/livecodes/editor-settings.js 24.3 kB +97 B (+0.4%)
build/livecodes/embed-ui.js 5.52 kB +9 B (+0.16%)
build/livecodes/embed.js 95.5 kB +1 B (0%)
build/livecodes/export.js 3.92 kB 0 B
build/livecodes/firebase.js 22.7 kB 0 B
build/livecodes/format.worker.js 16.7 kB -19 B (-0.11%)
build/livecodes/google-fonts.js 7.12 kB 0 B
build/livecodes/headless.js 83.4 kB +171 B (+0.21%)
build/livecodes/i18n-ar-language-info.json 6.79 kB +36 B (+0.53%)
build/livecodes/i18n-ar-translation.json 9.54 kB -5 B (-0.05%)
build/livecodes/i18n-bn-language-info.json 7.27 kB +38 B (+0.53%)
build/livecodes/i18n-bn-translation.json 9.88 kB +5 B (+0.05%)
build/livecodes/i18n-de-language-info.json 6.87 kB +31 B (+0.45%)
build/livecodes/i18n-de-translation.json 9.65 kB -9 B (-0.09%)
build/livecodes/i18n-en-language-info.json 5.85 kB +36 B (+0.62%)
build/livecodes/i18n-en-translation.json 8.25 kB -17 B (-0.21%)
build/livecodes/i18n-es-language-info.json 6.46 kB +32 B (+0.5%)
build/livecodes/i18n-es-translation.json 9.39 kB +15 B (+0.16%)
build/livecodes/i18n-fa-language-info.json 7.02 kB +31 B (+0.44%)
build/livecodes/i18n-fa-translation.json 9.71 kB +3 B (+0.03%)
build/livecodes/i18n-fr-language-info.json 6.69 kB +31 B (+0.47%)
build/livecodes/i18n-fr-translation.json 9.63 kB +4 B (+0.04%)
build/livecodes/i18n-hi-language-info.json 7.5 kB +41 B (+0.55%)
build/livecodes/i18n-hi-translation.json 10.2 kB +3 B (+0.03%)
build/livecodes/i18n-hu-language-info.json 6.79 kB +37 B (+0.55%)
build/livecodes/i18n-hu-translation.json 9.57 kB +5 B (+0.05%)
build/livecodes/i18n-id-language-info.json 6.24 kB +29 B (+0.47%)
build/livecodes/i18n-id-translation.json 8.9 kB +9 B (+0.1%)
build/livecodes/i18n-it-language-info.json 6.55 kB +37 B (+0.57%)
build/livecodes/i18n-it-translation.json 9.44 kB 0 B
build/livecodes/i18n-ja-language-info.json 7.23 kB +44 B (+0.61%)
build/livecodes/i18n-ja-translation.json 9.85 kB +8 B (+0.08%)
build/livecodes/i18n-nl-language-info.json 6.53 kB +37 B (+0.57%)
build/livecodes/i18n-nl-translation.json 9.11 kB 0 B
build/livecodes/i18n-pt-language-info.json 6.51 kB +34 B (+0.53%)
build/livecodes/i18n-pt-translation.json 9.57 kB +3 B (+0.03%)
build/livecodes/i18n-ru-language-info.json 7.22 kB +42 B (+0.59%)
build/livecodes/i18n-ru-translation.json 10.5 kB +7 B (+0.07%)
build/livecodes/i18n-tr-language-info.json 6.7 kB +46 B (+0.69%)
build/livecodes/i18n-tr-translation.json 9.47 kB +8 B (+0.08%)
build/livecodes/i18n-ur-language-info.json 7.53 kB +30 B (+0.4%)
build/livecodes/i18n-ur-translation.json 10 kB +5 B (+0.05%)
build/livecodes/i18n-zh-CN-language-info.json 6.33 kB +34 B (+0.54%)
build/livecodes/i18n-zh-CN-translation.json 8.88 kB +4 B (+0.05%)
build/livecodes/i18n.js 20.4 kB +30 B (+0.15%)
build/livecodes/import-src.js 20.5 kB +22 B (+0.11%)
build/livecodes/import.js 18.8 kB +35 B (+0.19%)
build/livecodes/index.js 5.52 kB 0 B
build/livecodes/lang-ada-wasm-script.js 3.53 kB 0 B
build/livecodes/lang-art-template-compiler.js 1.68 kB 0 B
build/livecodes/lang-assembly-wasm-script.js 3.58 kB 0 B
build/livecodes/lang-assemblyscript-compiler.js 290 B 0 B
build/livecodes/lang-assemblyscript-script.js 386 B 0 B
build/livecodes/lang-astro-compiler.js 2.37 kB 0 B
build/livecodes/lang-blazor-wasm-script.js 2.22 kB 0 B
build/livecodes/lang-clang-wasm-script.js 3.58 kB 0 B
build/livecodes/lang-clio-compiler.js 1.58 kB 0 B
build/livecodes/lang-cobol-wasm-script.js 3.69 kB 0 B
build/livecodes/lang-commonlisp-script.js 123 B 0 B
build/livecodes/lang-cpp-script.js 2.05 kB +3 B (+0.15%)
build/livecodes/lang-csharp-wasm-script.js 2.25 kB 0 B
build/livecodes/lang-diagrams-compiler-esm.js 5.14 kB 0 B
build/livecodes/lang-dot-compiler.js 1.69 kB 0 B
build/livecodes/lang-ejs-compiler.js 1.67 kB +15 B (+0.91%)
build/livecodes/lang-elm-compiler.js 1.66 kB 0 B
build/livecodes/lang-eta-compiler.js 1.68 kB 0 B
build/livecodes/lang-fanak-script.js 2.44 kB 0 B
build/livecodes/lang-fennel-compiler.js 1.65 kB +2 B (+0.12%)
build/livecodes/lang-fortran-wasm-script.js 3.53 kB 0 B
build/livecodes/lang-fsharp-compiler.js 802 B 0 B
build/livecodes/lang-fsharp-wasm-script.js 3.07 kB +2 B (+0.07%)
build/livecodes/lang-gleam-compiler.js 3.13 kB 0 B
build/livecodes/lang-go-wasm-script.js 3.3 kB 0 B
build/livecodes/lang-haml-compiler.js 1.68 kB -2 B (-0.12%)
build/livecodes/lang-handlebars-compiler.js 2.01 kB 0 B
build/livecodes/lang-haskell-script.js 1.91 kB 0 B
build/livecodes/lang-haskell-wasm-script.js 3.61 kB 0 B
build/livecodes/lang-imba-compiler.js 147 B 0 B
build/livecodes/lang-java-script.js 4.09 kB 0 B
build/livecodes/lang-jinja-compiler.js 1.68 kB +11 B (+0.66%)
build/livecodes/lang-julia-script.js 3.32 kB 0 B
build/livecodes/lang-liquid-compiler.js 1.7 kB -9 B (-0.53%)
build/livecodes/lang-lua-wasm-script.js 205 B 0 B
build/livecodes/lang-malina-compiler.js 3.65 kB -2 B (-0.05%)
build/livecodes/lang-markdown-compiler.js 1.7 kB 0 B
build/livecodes/lang-markdown-script.js 1.47 kB 0 B
build/livecodes/lang-minizinc-script.js 2.09 kB 0 B
build/livecodes/lang-mustache-compiler.js 1.67 kB 0 B
build/livecodes/lang-nunjucks-compiler.js 2.02 kB 0 B
build/livecodes/lang-pascal-compiler.js 1.6 kB 0 B
build/livecodes/lang-perl-script.js 268 B 0 B
build/livecodes/lang-php-wasm-script.js 347 B 0 B
build/livecodes/lang-postgresql-compiler-esm.js 1.76 kB 0 B
build/livecodes/lang-prolog-script.js 204 B 0 B
build/livecodes/lang-pug-compiler.js 371 B 0 B
build/livecodes/lang-python-wasm-script.js 1.89 kB 0 B
build/livecodes/lang-r-script-esm.js 2.47 kB 0 B
build/livecodes/lang-rescript-compiler-esm.js 2.19 kB 0 B
build/livecodes/lang-rescript-formatter.js 1.56 kB +1 B (+0.06%)
build/livecodes/lang-riot-compiler.js 3.52 kB 0 B
build/livecodes/lang-ruby-wasm-script.js 1.74 kB 0 B
build/livecodes/lang-rust-wasm-script.js 3.11 kB 0 B
build/livecodes/lang-scss-compiler.js 1.85 kB 0 B
build/livecodes/lang-solid-compiler.js 263 B 0 B
build/livecodes/lang-sql-compiler.js 1.66 kB -1 B (-0.06%)
build/livecodes/lang-sql-script.js 2.07 kB -10 B (-0.48%)
build/livecodes/lang-svelte-compiler.js 5.36 kB 0 B
build/livecodes/lang-swift-wasm-script.js 2.11 kB 0 B
build/livecodes/lang-tcl-script.js 1.86 kB 0 B
build/livecodes/lang-teal-compiler.js 1.75 kB 0 B
build/livecodes/lang-twig-compiler.js 1.69 kB +12 B (+0.72%)
build/livecodes/lang-vb-wasm-script.js 3.52 kB 0 B
build/livecodes/lang-vento-compiler.js 1.72 kB +16 B (+0.94%)
build/livecodes/lang-vue-compiler.js 6.75 kB -2 B (-0.03%)
build/livecodes/lang-vue2-compiler.js 4.18 kB 0 B
build/livecodes/lang-wat-compiler.js 348 B 0 B
build/livecodes/lang-wat-script.js 1.98 kB -1 B (-0.05%)
build/livecodes/lang-zig-wasm-script.js 5.15 kB 0 B
build/livecodes/language-info.js 10.1 kB +71 B (+0.71%)
build/livecodes/monaco.js 24.8 kB +23 B (+0.09%)
build/livecodes/open.js 6.24 kB +6 B (+0.1%)
build/livecodes/processor-lightningcss-compiler.js 1.91 kB -1 B (-0.05%)
build/livecodes/processor-postcss-compiler.js 2.06 kB 0 B
build/livecodes/processor-tailwindcss-compiler.js 5.33 kB +9 B (+0.17%)
build/livecodes/processor-unocss-compiler.js 355 B 0 B
build/livecodes/processor-windicss-compiler.js 450 B 0 B
build/livecodes/quill.css 697 B 0 B
build/livecodes/quill.js 5.89 kB +8 B (+0.14%)
build/livecodes/resources.js 3.43 kB -6 B (-0.17%)
build/livecodes/result-utils.js 1.97 kB 0 B
build/livecodes/share.js 3.89 kB +2 B (+0.05%)
build/livecodes/snippets.js 6.08 kB +1 B (+0.02%)
build/livecodes/sync-ui.js 3.29 kB -1 B (-0.03%)
build/livecodes/sync.js 3.57 kB 0 B
build/livecodes/sync.worker.js 29.7 kB 0 B
build/livecodes/templates.js 31.2 kB +162 B (+0.52%)
build/sdk/livecodes.js 4.43 kB 0 B
build/sdk/livecodes.umd.js 5.23 kB 0 B
build/sdk/package.json 456 B 0 B
build/sdk/preact.js 4.81 kB 0 B
build/sdk/react.js 4.79 kB 0 B
build/sdk/solid.js 4.94 kB 0 B
build/sdk/svelte.js 4.4 kB 0 B
build/sdk/vue.js 4.81 kB 0 B
build/sdk/web-components.js 5.83 kB 0 B

compressed-size-action

@hatemhosny

Copy link
Copy Markdown
Collaborator

@pullfrog

pull from develop and resolve merge conflicts.

deduplicate script. See da57767

@pullfrog

pullfrog Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Merged develop into the D (Wasm) branch and deduplicated the worker runner.

  • Resolved 6 conflicts by keeping both new languages: scripts/build.js, src/livecodes/languages/languages.ts, src/livecodes/models.ts, src/sdk/models.ts, storybook/_stories/EmbedOptions/template.ts, vendor-licenses.md.
  • Refactored src/livecodes/languages/d-wasm/lang-d-wasm-script.ts to use the shared createWorkerRunner from worker-runner.ts (per da57767), removing the inlined runner (~90 lines).
  • Verified: npm run typecheck:app, eslint, prettier, full npx jest src (416 passed), and test-i18n-export all pass. Pushed to pullfrog/1056-add-d-wasm.
Task list (4/4 completed)

Pullfrog  | View workflow run | via Pullfrog | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@hatemhosny

Copy link
Copy Markdown
Collaborator

@pullfrog

  • add translations
  • use this logo
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.0"
width="123.86523"
height="93.752739"
id="svg2">
<defs
id="defs4">
<linearGradient
id="linearGradient3482">
<stop
id="stop3484"
style="stop-color:#000000;stop-opacity:0.19791667"
offset="0" />
<stop
id="stop3486"
style="stop-color:#000000;stop-opacity:0.82291669"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3456">
<stop
id="stop3458"
style="stop-color:#ffffff;stop-opacity:1"
offset="0" />
<stop
id="stop3460"
style="stop-color:#ffffff;stop-opacity:0.33333334"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3420">
<stop
id="stop3430"
style="stop-color:#f2f2f0;stop-opacity:0.13541667"
offset="0" />
<stop
id="stop3424"
style="stop-color:#eeeeec;stop-opacity:0.39583334"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3360">
<stop
id="stop3362"
style="stop-color:#eeeeec;stop-opacity:1"
offset="0" />
<stop
id="stop3364"
style="stop-color:#eeeeec;stop-opacity:0"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3307">
<stop
id="stop3309"
style="stop-color:#a5d8ff;stop-opacity:1"
offset="0" />
<stop
id="stop3311"
style="stop-color:#003845;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3299">
<stop
id="stop3301"
style="stop-color:#ffffff;stop-opacity:1"
offset="0" />
<stop
id="stop3303"
style="stop-color:#979797;stop-opacity:0.57291669"
offset="1" />
</linearGradient>
<linearGradient
x1="27.247862"
y1="33.562527"
x2="44.49588"
y2="47.030663"
id="linearGradient3426"
xlink:href="#linearGradient3420"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.991763,-0.677924,0.501242)"
spreadMethod="reflect" />
<linearGradient
x1="24.48222"
y1="30.993589"
x2="104.02448"
y2="90.718597"
id="linearGradient3462"
xlink:href="#linearGradient3456"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.99719,0,0,0.988716,-0.49737,0.686728)" />
<linearGradient
x1="49.344894"
y1="57.756798"
x2="79.688202"
y2="83.106018"
id="linearGradient3488"
xlink:href="#linearGradient3482"
gradientUnits="userSpaceOnUse" />
<linearGradient
x1="27.247862"
y1="33.562527"
x2="44.49588"
y2="47.030663"
id="linearGradient2213"
xlink:href="#linearGradient3420"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,-0.991763,-0.677924,121.0142)"
spreadMethod="reflect" />
<linearGradient
x1="27.247862"
y1="33.562527"
x2="44.49588"
y2="47.030663"
id="linearGradient2232"
xlink:href="#linearGradient3420"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,-0.991763,-0.677924,121.0142)"
spreadMethod="reflect" />
</defs>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-2.9819053,-15.753182)"
id="layer1">
<g
transform="matrix(1.475092,0,0,1.475092,-30.36508,-28.63879)"
id="g2225"
style="display:inline">
<rect
width="80.581573"
height="60.167591"
rx="7.6942425"
ry="8.5425425"
x="25.996332"
y="33.483997"
id="rect3466"
style="fill:#2e3436;fill-opacity:0.2745098;fill-rule:nonzero;stroke:none" />
<rect
width="80.581573"
height="60.167591"
rx="7.6942425"
ry="8.5425425"
x="23.284639"
y="30.772299"
id="rect3297"
style="fill:#a40000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
<rect
width="74.010971"
height="54.137524"
rx="5.2214007"
ry="5.6200938"
x="26.569939"
y="33.787331"
id="rect3408"
style="fill:url(#linearGradient3426);fill-opacity:1;fill-rule:nonzero;stroke:none" />
<path
d="m 32.333318,39.18804 c -0.810423,0.100191 -1.445546,0.747081 -1.448237,1.530008 l 0.05115,39.976517 c -0.0033,0.05702 -0.0032,0.117055 2.23e-4,0.174065 -0.0093,0.0949 -0.0092,0.175886 3.47e-4,0.270764 -8.2e-5,0.0095 -5.8e-5,0.02917 4.9e-5,0.03868 0.0087,0.03837 0.0298,0.07834 0.04158,0.115983 -8.1e-5,0.0095 -8.1e-5,0.0098 2.5e-5,0.01934 0.0087,0.03838 0.0091,0.07837 0.02087,0.116011 -8.3e-5,0.0095 -5.7e-5,0.02917 4.9e-5,0.03868 0.01873,0.03878 0.04021,0.07874 0.0623,0.115951 -8e-5,0.0095 -8.1e-5,0.0098 2.5e-5,0.01934 0.02872,0.03929 0.07126,0.07924 0.103734,0.115892 -8.2e-5,0.0095 -8.2e-5,0.0098 2.4e-5,0.01934 0.01873,0.03878 0.04021,0.07875 0.0623,0.115952 -8.2e-5,0.0095 -5.7e-5,0.02917 4.9e-5,0.03868 0.03935,0.03021 0.08223,0.05048 0.124402,0.07718 -8.3e-5,0.0095 -5.7e-5,0.02917 4.9e-5,0.03868 0.02939,0.02959 0.05119,0.04989 0.08297,0.07724 0.01007,0.0096 0.03115,0.02925 0.04148,0.03862 0.02939,0.02959 0.05119,0.04989 0.08297,0.07724 0.01018,7.1e-5 0.01053,7.3e-5 0.02072,-3e-5 0.07575,0.06385 0.161798,0.123919 0.248826,0.173699 0.01019,7e-5 0.03125,4.4e-5 0.04143,-6e-5 0.03991,0.02052 0.08278,0.04046 0.124377,0.05784 0.01018,7e-5 0.01053,7.1e-5 0.02072,-2.9e-5 0.03992,0.02052 0.08279,0.04046 0.124376,0.05784 0.06051,0.01261 0.124828,0.01286 0.186479,0.01907 0.100723,0.01817 0.208212,0.03772 0.310804,0.03823 l 0.165737,-2.42e-4 15.309845,-0.06107 c 4.376235,-0.0078 7.307373,-0.08265 9.052976,-0.303342 0.01019,7.1e-5 0.03125,4.2e-5 0.04143,-6.2e-5 1.670518,-0.232037 3.440036,-0.65958 5.36408,-1.284309 3.344758,-1.045783 6.310742,-2.590914 8.860956,-4.65465 2.496912,-1.999262 4.431819,-4.366287 5.791789,-7.029031 1.359852,-2.662676 2.045357,-5.47805 2.040248,-8.396714 -0.0072,-4.062678 -1.236199,-7.866897 -3.702086,-11.289377 -2.466138,-3.422627 -5.83233,-6.043726 -9.974869,-7.779593 -4.211418,-1.785447 -9.702531,-2.598978 -16.514823,-2.586807 l -16.532201,0.02417 c -0.07107,3.95e-4 -0.138489,-0.0082 -0.207171,3.03e-4 z m 8.898154,8.225996 7.126664,-0.01042 c 3.330616,-0.0059 5.700107,0.09523 7.044164,0.279807 1.362489,0.187177 2.854705,0.582181 4.434981,1.192619 1.56625,0.596782 2.931614,1.327683 4.104845,2.237482 -8e-5,0.0095 -5.6e-5,0.02917 5e-5,0.03868 3.227673,2.470818 4.74922,5.440832 4.756204,9.373135 0.0071,4.02642 -1.463298,7.162711 -4.607379,9.792976 -0.967178,0.798314 -2.042682,1.475215 -3.22926,2.035463 -1.121501,0.522301 -2.58442,0.97246 -4.431715,1.360307 -1.742195,0.348503 -4.387131,0.54682 -7.83035,0.552979 l -7.333833,0.01072 -0.03437,-26.863756 z"
id="path2242"
style="font-size:64px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#eeeeec;fill-opacity:1;stroke:none;font-family:Gill Sans MT" />
<path
d="m 89.367876,35.647667 a 5.9689121,5.4715028 0 1 1 -11.937824,0 5.9689121,5.4715028 0 1 1 11.937824,0 z"
transform="matrix(1.950025,0,0,1.950025,-82.91788,-16.34322)"
id="path2211"
style="fill:#eeeeec;fill-opacity:1;fill-rule:nonzero;stroke:none" />
<rect
width="78.006226"
height="57.749683"
rx="6.5702238"
ry="7.3061213"
x="24.572311"
y="31.981253"
id="rect3372"
style="fill:none;stroke:url(#linearGradient3462);stroke-width:1.34628034;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<rect
width="80.581573"
height="60.167591"
rx="7.6942425"
ry="8.5425425"
x="23.284639"
y="30.772299"
id="rect3464"
style="fill:none;stroke:#323232;stroke-width:1.3558476;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
d="m 31.791339,87.728149 63.56817,0 c 2.892656,0 5.221401,-2.506561 5.221401,-5.620093 l 0,-9.001145 C 77.875731,64.373285 45.003847,59.694557 26.569939,59.548435 l 0,22.559621 c 0,3.113532 2.328744,5.620093 5.2214,5.620093 z"
id="rect3477"
style="fill:url(#linearGradient2232);fill-opacity:1;fill-rule:nonzero;stroke:none" />
<path
d="m 89.367876,35.647667 a 5.9689121,5.4715028 0 1 1 -11.937824,0 5.9689121,5.4715028 0 1 1 11.937824,0 z"
transform="matrix(0.626567,0,0,0.626567,40.72046,19.11002)"
id="path2222"
style="fill:#eeeeec;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline" />
</g>
</g>
</svg>
 ```

@pullfrog

pullfrog Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Done — both requested changes are pushed to PR #1058 (commit 82162a285).

Translations: Added real localized language-info entries (d-wasm.desc/link/name) and the templates.starter.d-wasm label to all 17 non-English locales (ar, bn, de, es, fa, fr, hi, hu, id, it, ja, nl, pt, ru, tr, ur, zh-CN), each mirroring the en <tag-N> placeholder sequence. .ts and .lokalise.json pairs are consistent.

Logo: Replaced src/livecodes/assets/templates/d.svg with the SVG you provided (official DMD logo), adding a matching viewBox so it scales correctly in the starter template's <img class="logo"> (150px).

Verification: npm run test:i18n-export, npx jest src (416 passed), plus prettier/eslint on the locales and XML well-formedness all pass. The prepush typecheck failure is pre-existing storybook breakage (common/arg-types.ts unused @ts-expect-error, missing livecodes/svelte), unrelated to these files.

Task list (4/4 completed)
  • Replace D logo SVG with maintainer-provided one
  • Add translations for d-wasm language keys across all non-en locales
  • Verify typecheck/lint/tests
  • Commit and push

Pullfrog  | View workflow run | via Pullfrog | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@pullfrog

pullfrog Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Fixed the CI failure on this PR.

Diagnosis: The last commit added Monaco D support (monaco: { languageSupport: ...'d.js', language: 'd' }) but left the spec asserting the old C++ fallback (expect(...monaco?.language).toBe('cpp')), so test:unit failed. It also left @live-codes/monaco-languages pinned at 0.3.10, whose dist/ does not contain d.js (only 0.3.11 does) — so the feature would have 404'd at runtime.

Fix (commit 0ca399474):

  • Bumped @live-codes/monaco-languages@0.3.10 → 0.3.11 in src/livecodes/vendors.ts (0.3.11 adds d.js/v.js and removes nothing).
  • Updated the spec to expect monaco.language === 'd' and renamed the test accordingly.

Verification: npm run test:unit (416/416 pass), npm run typecheck:app, Prettier and ESLint on the changed files all pass.

Note: the prepush hook's typecheck:storybook step fails on pre-existing, unrelated errors (common/arg-types.ts unused @ts-expect-error, common/livecodes.ts cannot resolve livecodes/svelte) — it was skipped for the actual push.

Task list (4/4 completed)
  • Checkout PR branch
  • Diagnose test failure in d-wasm lang spec
  • Fix and verify with exact CI command
  • Commit and push

Pullfrog  | View workflow run | via Pullfrog | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

The D (Wasm) spec points Monaco at d.js, which only exists in monaco-languages 0.3.11. Bump the pinned version and update the stale spec expectation that still assumed the C++ fallback.
@sonarqubecloud

sonarqubecloud Bot commented Oct 6, 2026

Copy link
Copy Markdown

@hatemhosny
hatemhosny merged commit 5e0d08a into develop Oct 6, 2026
21 checks passed
@livecodes-ci

livecodes-ci Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

i18n Actions

Source PR has been merged into the default branch.

Maintainers can comment .i18n-update-push to trigger the i18n update workflow and push the changes to Lokalise.

@hatemhosny
hatemhosny deleted the pullfrog/1056-add-d-wasm branch October 6, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add D language support

2 participants