<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>todays_mitsui</author_name>
  <author_url>https://blog.hatena.ne.jp/todays_mitsui/</author_url>
  <blog_title>無駄と文化</blog_title>
  <blog_url>https://blog.mudatobunka.org/</blog_url>
  <categories>
    <anon>WebAssembly</anon>
    <anon>Go</anon>
    <anon>プログラミング</anon>
  </categories>
  <description>JavaScript から wasm の関数に文字列を渡して呼び出す方法を書き残します。 この記事は二本立てです 後編はこちら。 blog.mudatobunka.org 前後編のコードを全部まとめたリポジトリがここにあります。 github.com 前提知識 wasm に文字列型は無い wasm で扱えるデータ型は i32, i64, f32, f64 のみです。ざっくりと整数型と浮動小数点数型です。つまりそもそも wasm 世界で文字列型を直接扱うことは出来ないわけです。 そのため整数型や浮動小数点数型よりも複雑なデータを扱おうとすると、ポインタ と データの長さ の長さの組みを使って メ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.mudatobunka.org%2Fentry%2F2025%2F01%2F14%2F120000_1&quot; title=&quot;JavaScript から wasm に文字列を渡す with TinyGo - 無駄と文化&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-01-14 12:00:00</published>
  <title>JavaScript から wasm に文字列を渡す with TinyGo</title>
  <type>rich</type>
  <url>https://blog.mudatobunka.org/entry/2025/01/14/120000_1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
