WebAssembly

WebAssemblyコードスクリーンショット生成

WebAssemblyのスニペットを、Macから離れることなく共有したくなる画像に。

WebAssembly text format is read far more often than it is written, and almost always in an explanation of what a compiler produced.

Codeshotは貼り付けたコードからWebAssemblyを判別するので、言語の選び間違いは起きません。付属する30種類のうち3つのテーマで同じスニペットを、アプリ自身のスタイルシートで表示しています。

(module
  (func $scale (param $x i32) (result i32)
    local.get $x
    i32.const 2
    i32.mul)

  (export "scale" (func $scale)))
GitHub · ダーク
(module
  (func $scale (param $x i32) (result i32)
    local.get $x
    i32.const 2
    i32.mul)

  (export "scale" (func $scale)))
Solarized · ダーク
(module
  (func $scale (param $x i32) (result i32)
    local.get $x
    i32.const 2
    i32.mul)

  (export "scale" (func $scale)))
Tokyo Night · ダーク

WebAssemblyに合うテーマ選び

The parenthesised structure carries the nesting. Give it a theme with distinct delimiter colouring, and do not crop the closing parens.

サイズを正しく決める

画像サイズを内容に合わせるか、比率で固定します(1:1、4:3、3:2、16:9、9:16、2:3、3:4)。そのうえで1×・2×・3×から選んで書き出せば、Retinaディスプレイでも鮮明なままです。Cでクリップボードに直接コピー、またはSで保存できます。

30種類のテーマを見比べるか、全体の流れをご覧ください。

WebAssemblyと、ほかの59言語のために

すべてMac上で動作します。コードが外に出ることはありません。

macOS版をダウンロード