Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RustでWasm Runtimeを書いた in UV_Study

skanehira
September 13, 2023

RustでWasm Runtimeを書いた in UV_Study

skanehira

September 13, 2023
Tweet

More Decks by skanehira

Other Decks in Programming

Transcript

  1. QSPGJMF \ OBNFΰϦϥ  KPC< ΤϯδχΞ  ձࣾܦӦ > 

    MJLFT< 3VTU  (P  5ZQF4DSJQU  %FOP  7JN  8BTN  %PDLFS  LT >  TOT< 9 5XJUUFS IUUQTUXJUUFSDPNHPSJMMB  (JU)VCIUUQTHJUIVCDPNTLBOFIJSB  [FOOIUUQT[FOOEFWTLBOFIJSB > >
  2. 00000000: 0061 736d 0100 0000 0106 0160 017f 017f .asm.......`....

    00000010: 0302 0100 0707 0103 6669 6200 000a 1e01 ........fib..... 00000020: 1c00 2000 4101 4d04 7f41 0105 2000 4102 .. .A.M..A.. .A. 00000030: 6b10 0020 0041 016b 1000 6a0b 0b0a k.. .A.k..j... Wasm Runtimeで動くフィボナッチ関数のバイトコード
  3. *OTUSVDUJPO 
 8BTNͷ໋ྩ܈ 7BMVF 
 8BTNͰѻ͑Δ஋ 
 J΍JɺGͳͲ 3VOUJNFTUBDL 


    ॲཧ࣌ͷ஋Λอ࣋͢Δ഑ྻ 3VOUJNFFYFDVUF 
 ໋ྩΛॲཧ͢Δؔ਺ QD 
 ϓϩάϥϜΧ΢ϯλ 
 ࣍ͷ໋ྩͷ൪஍ʢΠϯσοΫεʣ
  4. 'SBNF 
 ؔ਺ͷݺͼग़͠ͷ౓ʹੜ੒͢Δ 
  
 ྫ͑͹ɺ" # ͷΑ͏ͳؔ਺ݺͼग़͠ 


    ͕͋Δ৔߹ɺ" ͷॲཧதʹ# ͷ໋ྩΛ 
 ॲཧ͠ɺͦΕ͕ऴΘͬͨΒ" ʹ໭Δࡍʹ 
 " ͷQDʹ໭͢ඞཁ͕͋Δ 
 ؔ਺͝ͱʹQDͱ໋ྩΛ·ͱΊͯ'SBNFͰ 
 ؅ཧ͢Δ͜ͱͰɺݺͼग़͠ݩʹ໭Δͱ͖ 
 ͷॲཧ͸'SBNFΛ੾Γସ͑Δ͚ͩͰࡁΉ