PageSourceSearch

https://www.moonbitlang.com/assets/js/b8cf8a95.81de901c.js

js moonbitlang.com collected 2026-10-03 19:34:12 UTC 55,000 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4861],{9258:(s,e,i)=>{i.r(e),i.d(e,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>a,metadata:()=>l,toc:()=>o});var l=i(97794),n=i(13274),r=i(98703);const a={},c="2025-03-24",d={authorsImageUrls:[]},o=[{value:"Language Updates",id:"language-updates",level:2},{value:"Pattern Matching for <code>Bytes</code>",id:"pattern-matching-for-bytes",level:3},{value:"<code>Char</code> Literals as <code>Int</code> &amp; <code>Byte</code>",id:"char-literals-as-int--byte",level:3},{value:"Adjustments to Escape Sequences in <code>String</code> and <code>Bytes</code> Literals",id:"adjustments-to-escape-sequences-in-string-and-bytes-literals",level:3},{value:"Operator Overloading with Traits",id:"operator-overloading-with-traits",level:3},{value:"Function Aliasing",id:"function-aliasing",level:3},{value:"Batch Import for Type &amp; Trait Aliases",id:"batch-import-for-type--trait-aliases",level:3},{value:"Removed <code>type T</code> for External Type Syntax",id:"removed-type-t-for-external-type-syntax",level:3},{value:"C FFI Finalizers",id:"c-ffi-finalizers",level:3},{value:"LLVM Debugging",id:"llvm-debugging",level:3},{value:"Build System Updates",id:"build-system-updates",level:2},{value:"IDE Updates",id:"ide-updates",level:2}];function t(s){const e={code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",span:"span",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...s.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h2,{id:"language-updates",children:"Language Updates"}),"\n",(0,n.jsxs)(e.h3,{id:"pattern-matching-for-bytes",children:["Pattern Matching for ",(0,n.jsx)(e.code,{children:"Bytes"})]}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.code,{children:"Bytes"})," can now use array patterns for pattern matching."]}),"\n",(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e.pre,{className:"shiki shiki-themes one-light one-dark-pro",style:{backgroundColor:"#FAFAFA","--shiki-dark-bg":"#282c34",color:"#383A42","--shiki-dark":"#abb2bf"},tabIndex:"0",children:(0,n.jsxs)(e.code,{children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"fn"}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:" main"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"  let"}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:" bytes"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" : "}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Bytes"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#56B6C2"},children:" ="}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:' "Hello, world!"'}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:";"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"  match"}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:" bytes"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"    [..b"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"Hello"'}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:", ..] "}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"=>"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"      println"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"Starts with '}),(0,n.jsx)(e.span,{style:{color:"#0184BC","--shiki-dark":"#56B6C2"},children:'\\"'}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:"Hello"}),(0,n.jsx)(e.span,{style:{color:"#0184BC","--shiki-dark":"#56B6C2"},children:'\\"'}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"'}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:");"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"    }"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:"    _"}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:" =>"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"      println"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:"\"Doesn't start with "}),(0,n.jsx)(e.span,{style:{color:"#0184BC","--shiki-dark":"#56B6C2"},children:'\\"'}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:"Hello"}),(0,n.jsx)(e.span,{style:{color:"#0184BC","--shiki-dark":"#56B6C2"},children:'\\"'}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"'}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:");"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"    }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"  }"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"}"})})]})})}
1),"\n",(0,n.jsxs)(e.h3,{id:"char-literals-as-int--byte",children:[(0,n.jsx)(e.code,{children:"Char"})," Literals as ",(0,n.jsx)(e.code,{children:"Int"})," & ",(0,n.jsx)(e.code,{children:"Byte"})]}),"\n",(0,n.jsxs)(e.p,{children:["Character (",(0,n.jsx)(e.code,{children:"Char"}),") literals can now be used in places where an ",(0,n.jsx)(e.code,{children:"Int"})," value is expected, with the semantic meaning being their corresponding Unicode code point. Additionally, character literals can also be used in places where a ",(0,n.jsx)(e.code,{children:"Byte"})," value is expected, but if the Unicode code point exceeds the ",(0,n.jsx)(e.code,{children:"Byte"})," range, an error will be raised."]}),"\n",(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e.pre,{className:"shiki shiki-themes one-light one-dark-pro",style:{backgroundColor:"#FAFAFA","--shiki-dark-bg":"#282c34",color:"#383A42","--shiki-dark":"#abb2bf"},tabIndex:"0",children:(0,n.jsxs)(e.code,{children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"fn"}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:" main"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"  let"}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:" a"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" : "}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Int"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#56B6C2"},children:" ="}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:" 'a'"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:";"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"  println"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:"a"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:") "}),(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"// 97"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"  let"}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:" b"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" : "}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Byte"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#56B6C2"},children:" ="}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:" 'a'"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:";"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"  println"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:"b"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:") "}),(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"// b'\\x61'"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"  let"}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:" c"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" : "}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Byte"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#56B6C2"},children:" ="}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:" '\ud83c\udf89'"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"  //             ^^^ Error: Char literal '\ud83c\udf89' for Byte is out of range."})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"}"})})]})})}
1),"\n",(0,n.jsxs)(e.h3,{id:"adjustments-to-escape-sequences-in-string-and-bytes-literals",children:["Adjustments to Escape Sequences in ",(0,n.jsx)(e.code,{children:"String"})," and ",(0,n.jsx)(e.code,{children:"Bytes"})," Literals"]}),"\n",(0,n.jsxs)(e.p,{children:["Due to ambiguities in interpreting escape sequences like ",(0,n.jsx)(e.code,{children:"\\x.."})," and ",(0,n.jsx)(e.code,{children:"\\o.."})," in different contexts (e.g., ",(0,n.jsx)(e.code,{children:"String"})," type vs. ",(0,n.jsx)(e.code,{children:"Bytes"})," type), we have made the following adjustments:"]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["In string literals used in ",(0,n.jsx)(e.code,{children:"String"}),"-typed positions, the escape sequences ",(0,n.jsx)(e.code,{children:"\\xFF"})," and ",(0,n.jsx)(e.code,{children:"\\o377"})," are now deprecated. It is recommended to use ",(0,n.jsx)(e.code,{children:"\\u00FF"})," or ",(0,n.jsx)(e.code,{children:"\\u{FF}"})," instead for better clarity. This change does not affect ",(0,n.jsx)(e.code,{children:"Bytes"})," literals or string literals overloaded to ",(0,n.jsx)(e.code,{children:"Bytes"}),", as shown in the following example:"]}),"\n"]}),"\n",(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e.pre,{className:"shiki shiki-themes one-light one-dark-pro",style:{backgroundColor:"#FAFAFA","--shiki-dark-bg":"#282c34",color:"#383A42","--shiki-dark":"#abb2bf"},tabIndex:"0",children:(0,n.jsxs)(e.code,{children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"let"}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:" bytes1"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:": "}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Bytes"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#56B6C2"},children:" ="}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:' "'}),(0,n.jsx)(e.span,{style:{color:"#0184BC","--shiki-dark":"#56B6C2"},children:"\\xFF\\o377"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"'}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:";  "}),(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"// ok"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"let"}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:" bytes2"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#56B6C2"},children:" ="}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:" b"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"'}),(0,n.jsx)(e.span,{style:{color:"#0184BC","--shiki-dark":"#56B6C2"},children:"\\xFF\\o377"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"'}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:";        "}),(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"// ok, bytes2 == bytes1"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"let"}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:" str"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:": "}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"String"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#56B6C2"},children:" ="}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:' "'}),(0,n.jsx)(e.span,{style:{color:"#0184BC","--shiki-dark":"#56B6C2"},children:"\\xFF\\o377"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"'}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:";    "}),(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"// warning: deprecated escape sequences"})]})]})})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["\n",(0,n.jsxs)(e.p,{children:["Support for UTF-16 surrogate pairs (e.g., ",(0,n.jsx)(e.code,{children:"\\uD835\\uDD04"}),") has been removed. For characters beyond the BMP (Basic Multilingual Plane) code points, use ",(0,n.jsx)(e.code,{children:"\\u{...}"})," instead."]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["\n",(0,n.jsxs)(e.p,{children:["Unicode escape sequences are now deprecated 
1in ",(0,n.jsx)(e.code,{children:"Bytes"})," literals (",(0,n.jsx)(e.code,{children:'b"..."'}),") and string literals overloaded to ",(0,n.jsx)(e.code,{children:"Bytes"})," (",(0,n.jsx)(e.code,{children:'"..."'}),")."]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e.pre,{className:"shiki shiki-themes one-light one-dark-pro",style:{backgroundColor:"#FAFAFA","--shiki-dark-bg":"#282c34",color:"#383A42","--shiki-dark":"#abb2bf"},tabIndex:"0",children:(0,n.jsxs)(e.code,{children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"let"}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:" bytes1"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#56B6C2"},children:" ="}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:" b"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"'}),(0,n.jsx)(e.span,{style:{color:"#0184BC","--shiki-dark":"#56B6C2"},children:"\\u4E2D"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"'}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:";          "}),(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:'// deprecated, use b"\\xE4\\xB8\\xAD" instead'})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"let"}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:" bytes2"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#56B6C2"},children:" ="}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" ("}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"'}),(0,n.jsx)(e.span,{style:{color:"#0184BC","--shiki-dark":"#56B6C2"},children:"\\u4E2D"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"'}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" : "}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Bytes"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"); "}),(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:'// use ("\\xE4\\xB8\\xAD" : Bytes) instead'})]})]})})}),"\n",(0,n.jsx)(e.h3,{id:"operator-overloading-with-traits",children:"Operator Overloading with Traits"}),"\n",(0,n.jsxs)(e.p,{children:["Operator overloading is no longer implemented by adding methods like ",(0,n.jsx)(e.code,{children:"op_add"}),"/",(0,n.jsx)(e.code,{children:"op_mul"}),"/... to types. Instead, it is now implemented by implementing standard library (",(0,n.jsx)(e.code,{children:"core"}),") traits such as ",(0,n.jsx)(e.code,{children:"Add"}),"/",(0,n.jsx)(e.code,{children:"Mul"}),", etc. Below is a mapping of operators to their corresponding traits:"]}),"\n",(0,n.jsxs)(e.table,{children:[(0,n.jsx)(e.thead,{children:(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.th,{children:"Operator"}),(0,n.jsx)(e.th,{children:"Trait"})]})}),(0,n.jsxs)(e.tbody,{children:[(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"=="})}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"Eq"})})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"+"})}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"Add"})})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"-"})}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"Sub"})})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"*"})}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"Mul"})})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"/"})}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"Div"})})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsxs)(e.td,{children:[(0,n.jsx)(e.code,{children:"-"})," (prefix)"]}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"Neg"})})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"%"})}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"Mod"})})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"&"})}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"BitAnd"})})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"|"})}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"BitOr"})})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"^"})}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"BitXOr"})})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"<<"})}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"Shl"})})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:">>"})}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.code,{children:"Shr"})})]})]})]}
1),"\n",(0,n.jsxs)(e.p,{children:["If your code has custom operator overloading, you should replace method definitions with corresponding ",(0,n.jsx)(e.code,{children:"trait"})," ",(0,n.jsx)(e.code,{children:"impl"})," implementations. In the future, using methods for operator overloading will trigger warnings. Once the method-based overloading is fully removed, using methods to overload operators will result in compilation errors."]}),"\n",(0,n.jsxs)(e.p,{children:["If your code defines ",(0,n.jsx)(e.code,{children:"traits"})," containing operators, you should change those ",(0,n.jsx)(e.code,{children:"trait"})," definitions to declare super traits corresponding to the operator. For example:"]}),"\n",(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e.pre,{className:"shiki shiki-themes one-light one-dark-pro",style:{backgroundColor:"#FAFAFA","--shiki-dark-bg":"#282c34",color:"#383A42","--shiki-dark":"#abb2bf"},tabIndex:"0",children:(0,n.jsxs)(e.code,{children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"trait"}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:" Number"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"  op_add"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Self"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:", "}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Self"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:") "}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"->"}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:" Self"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"  op_mul"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Self"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:", "}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Self"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:") "}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"->"}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:" Self"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"  literal"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Int"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:") "}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"->"}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:" Self"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"}"})})]})})}),"\n",(0,n.jsx)(e.p,{children:"Should be changed to:"}),"\n",(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e.pre,{className:"shiki shiki-themes one-light one-dark-pro",style:{backgroundColor:"#FAFAFA","--shiki-dark-bg":"#282c34",color:"#383A42","--shiki-dark":"#abb2bf"},tabIndex:"0",children:(0,n.jsxs)(e.code,{children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"trait"}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:" Number"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" : "}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Add"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" + "}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Mul"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"  literal"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Int"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:") "}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"->"}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:" Self"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"}"})})]})})}),"\n",(0,n.jsx)(e.h3,{id:"function-aliasing",children:"Function Aliasing"}),"\n",(0,n.jsxs)(e.p,{children:["The syntax is ",(0,n.jsx)(e.code,{children:"fnalias <old_fn_name> as <new_fn_name>"}),". Function aliases allow users to conveniently use package functions and help with refactoring when functions are moved across packages."]}),"\n",(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e.pre,{className:"shiki shiki-themes one-light one-dark-pro",style:{backgroundColor:"#FAFAFA","--shiki-dark-bg":"#282c34",color:"#383A42","--shiki-dark":"#abb2bf"},tabIndex:"0",children:(0,n.jsxs)(e.code,{children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"fnalias"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#E5C07B"},children:" @hashmap"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:".new "}),(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"// Equivalent to fnalias @hashmap.new as new"})]}),"\n",(0,n.jsx)(e.span,{className:"line"}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"fn"}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:" f"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"}
1,children:"() "}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"->"}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:" Int"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"  new"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"()."}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"length"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"()"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"}"})}),"\n",(0,n.jsx)(e.span,{className:"line"}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"fnalias"}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:" f"}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:" as"}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:" g"})]}),"\n",(0,n.jsx)(e.span,{className:"line"}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"fn"}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:" main"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"  println"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"f: '}),(0,n.jsx)(e.span,{style:{color:"#CA1243","--shiki-dark":"#C678DD"},children:"\\{"}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"f"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#ABB2BF"},children:"()"}),(0,n.jsx)(e.span,{style:{color:"#CA1243","--shiki-dark":"#C678DD"},children:"}"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"'}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:")"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"  println"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"g: '}),(0,n.jsx)(e.span,{style:{color:"#CA1243","--shiki-dark":"#C678DD"},children:"\\{"}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"g"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#ABB2BF"},children:"()"}),(0,n.jsx)(e.span,{style:{color:"#CA1243","--shiki-dark":"#C678DD"},children:"}"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"'}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"}"})})]})})}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.code,{children:"fnalias"})," also supports batch import syntax:\r\n",(0,n.jsx)(e.code,{children:"fnalias @pkg.(f1s as g1, f2 as g2, ..)"})]}),"\n",(0,n.jsx)(e.h3,{id:"batch-import-for-type--trait-aliases",children:"Batch Import for Type & Trait Aliases"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.code,{children:"typealias @pkg.(A, B, C)"})," allows batch import of types."]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.code,{children:"traitalias @pkg.(D, E, F)"})," allows batch import of traits."]}),"\n"]}),"\n",(0,n.jsxs)(e.p,{children:["For example, if the ",(0,n.jsx)(e.code,{children:"lib"})," package defines two types ",(0,n.jsx)(e.code,{children:"A"})," and ",(0,n.jsx)(e.code,{children:"B"}),", each with a ",(0,n.jsx)(e.code,{children:"new"})," method, another package can alias them as follows:"]}),"\n",(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e.pre,{className:"shiki shiki-themes one-light one-dark-pro",style:{backgroundColor:"#FAFAFA","--shiki-dark-bg":"#282c34",color:"#383A42","--shiki-dark":"#abb2bf"},tabIndex:"0",children:(0,n.jsxs)(e.code,{children:[(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"typealias"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#E5C07B"},children:" @lib"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:".("}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"A"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:", "}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"B"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:")"})]}),"\n",(0,n.jsx)(e.span,{className:"line"}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"fn"}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:" main"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"  println"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"A"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"::"}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"new"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"}
1,children:"())"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"  println"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"B"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"::"}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"new"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"())"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"}"})})]})})}),"\n",(0,n.jsxs)(e.h3,{id:"removed-type-t-for-external-type-syntax",children:["Removed ",(0,n.jsx)(e.code,{children:"type T"})," for External Type Syntax"]}),"\n",(0,n.jsxs)(e.p,{children:["The ",(0,n.jsx)(e.code,{children:"type T"})," syntax for defining external types has been officially removed. External types must now be defined using ",(0,n.jsx)(e.code,{children:"extern type T"}),". The ",(0,n.jsx)(e.code,{children:"type T"})," syntax itself has not been removed but has gained a different meaning."]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.code,{children:"extern type T"})," defines a completely external type that does not participate in MoonBit's garbage collection."]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.code,{children:"type T"})," now defines a regular MoonBit type that is garbage-collected."]}),"\n"]}),"\n",(0,n.jsxs)(e.p,{children:["This new meaning of ",(0,n.jsx)(e.code,{children:"type T"}),", combined with the newly added C FFI external object feature, enables dynamic management and release of FFI external objects."]}),"\n",(0,n.jsx)(e.h3,{id:"c-ffi-finalizers",children:"C FFI Finalizers"}),"\n",(0,n.jsxs)(e.p,{children:["By calling ",(0,n.jsx)(e.code,{children:"moonbit_make_external_object"})," on the C side, FFI authors can register a custom destructor function to release resources associated with an object. Here\u2019s an example:"]}),"\n",(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e.pre,{className:"shiki shiki-themes one-light one-dark-pro",style:{backgroundColor:"#FAFAFA","--shiki-dark-bg":"#282c34",color:"#383A42","--shiki-dark":"#abb2bf"},tabIndex:"0",children:(0,n.jsxs)(e.code,{children:[(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"// MoonBit side"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"type"}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:" Greeting"}),(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:" // Note: not extern type"})]}),"\n",(0,n.jsx)(e.span,{className:"line"}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"extern"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:' "c"'}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:" fn"}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:" Greeting"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"::"}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"new"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"() "}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"->"}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:" Greeting"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#56B6C2"},children:" ="}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:' "greeting_new"'})]}),"\n",(0,n.jsx)(e.span,{className:"line"}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"fn"}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:" main"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"  ignore"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#C18401","--shiki-dark":"#E5C07B"},children:"Greeting"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"::"}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"new"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"}
1,children:"())"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"}"})})]})})}),"\n",(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e.pre,{className:"shiki shiki-themes one-light one-dark-pro",style:{backgroundColor:"#FAFAFA","--shiki-dark-bg":"#282c34",color:"#383A42","--shiki-dark":"#abb2bf"},tabIndex:"0",children:(0,n.jsxs)(e.code,{children:[(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"// C side"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"#include"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:' "moonbit.h"'}),(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:" // Make sure to add $MOON_HOME/include to the include paths"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"#include"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:" <stdlib.h>"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"#include"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:" <stdio.h>"})]}),"\n",(0,n.jsx)(e.span,{className:"line"}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"char"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" message"}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"[]"}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:" ="}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:' "Hello, World!"'}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:";"})]}),"\n",(0,n.jsx)(e.span,{className:"line"}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"struct"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" greeting {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"  char"}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:" *"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"data;"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"};"})}),"\n",(0,n.jsx)(e.span,{className:"line"}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"void"}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:" greeting_delete"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"void"}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:" *"}),(0,n.jsx)(e.span,{style:{color:"#383A42",fontStyle:"inherit","--shiki-dark":"#E06C75","--shiki-dark-font-style":"italic"},children:"object"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:") {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"  fprintf"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"(stderr, "}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"greeting_delete'}),(0,n.jsx)(e.span,{style:{color:"#0184BC","--shiki-dark":"#56B6C2"},children:"\\n"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:'"'}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:");"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"  free"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"((("}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"struct"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" greeting"}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"*"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:")object)->"}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:"data"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:");"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"  // No need to free the object itself; MoonBit\u2019s reference counting will handle it."})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"}"})}),"\n",(0,n.jsx)(e.span,{className:"line"}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"struct"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" greeting "}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"*"}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"greeting_new"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"void"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:") {"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"  char"}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:" *"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"data "}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"="}),(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:" malloc"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"sizeof"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"(message));"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"  /* moonbit_make_external_object("})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"       void (*func_ptr)(void*),"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"       int32_t size"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"     )"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"     Where:"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"     - `func_ptr` is a function pointer responsible for releasing the resources stored in the object."})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"     - `size` is the size of the custom data within the object, measured in bytes."})}),"\n",(0,n.jsx)(e.span,{className:"line"}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"     `moonbit_make_external_object` allocates a MoonBit object with a total size of"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"     `size + sizeof(func_ptr)` and returns a pointer to its data."})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"     `func_ptr` is stored at the end of the object,"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"     so the returned pointer can be directly used as a pointer to the custom data."})}),"\n",(0,n.jsx)(e.span,{className:"line"}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"     If there are other C APIs that accept `struct greeting*`,"})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"     you can directly pass a MoonBit value of type `Greeting` to them without conversion."})}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#A0A1A7",fontStyle:"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"},children:"  */"})}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"  struct"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" greeting "}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"*"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"greeting "}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"="})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"      moonbit_make_external_object"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"&"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"greeting_delete, "}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"sizeof"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"("}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"struct"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" greeting));"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E5C07B"},children:"  greeting"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"->"}),(0,n.jsx)(e.span,{style:{color:"#E45649","--shiki-dark":"#E06C75"},children:"data"}),(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:" ="}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" data;"})]}),"\n",(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#A626A4","--shiki-dark":"#C678DD"},children:"  return"}),(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:" greeting;"})]}),"\n",(0,n.jsx)(e.span,{className:"line",children:(0,n.jsx)(e.span,{style:{color:"#383A42","--shiki-dark":"#ABB2BF"},children:"}"})})]})})}),"\n",(0,n.jsx)(e.h3,{id:"llvm-debugging",children:"LLVM Debugging"}
1),"\n",(0,n.jsxs)(e.p,{children:["The LLVM backend has initially implemented the ability to print local variable values in the debugger. Developers using ",(0,n.jsx)(e.code,{children:"gdb"}),", ",(0,n.jsx)(e.code,{children:"lldb"}),", and other debugging tools can now view local variable values for basic data types (integers, floating-point numbers). Support for strings, arrays, and complex data structures is actively in development."]}),"\n",(0,n.jsx)(e.h2,{id:"build-system-updates",children:"Build System Updates"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"The bleeding-edge Windows toolchain now supports the LLVM backend. Windows users can install it as follows:"}),"\n"]}),"\n",(0,n.jsx)(e.pre,{children:(0,n.jsx)(e.code,{className:"language-PowerShell",children:'$env:MOONBIT_INSTALL_VERSION = "bleeding"; irm https://cli.moonbitlang.com/install/powershell.ps1 | iex\n'})}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["A ",(0,n.jsx)(e.code,{children:"dev"})," version of the toolchain is now available, which retains more debugging information for diagnosing compiler issues and errors. Install it using:"]}),"\n"]}),"\n",(0,n.jsx)(e.pre,{children:(0,n.jsx)(e.code,{className:"language-PowerShell",children:"# Unix (Linux or macOS)\r\ncurl https://cli.moonbitlang.com/install/unix.sh | MOONBIT_INSTALL_DEV=1 bash\r\n# Windows (PowerShell)\r\n$env:MOONBIT_INSTALL_DEV = 1; irm https://cli.moonbitlang.com/install/powershell.ps1 | iex\r\n# moon\r\nmoon upgrade --dev\n"})}),"\n",(0,n.jsxs)(e.p,{children:["Note: The ",(0,n.jsx)(e.code,{children:"dev"})," toolchain does not support the LLVM backend yet."]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"MoonBit-supported Markdown files can now be tested. These test code snippets will run as black-box tests:"}),"\n"]}),"\n",(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(e.pre,{className:"shiki shiki-themes one-light one-dark-pro",style:{backgroundColor:"#FAFAFA","--shiki-dark-bg":"#282c34",color:"#383A42","--shiki-dark":"#abb2bf"},tabIndex:"0",children:(0,n.jsx)(e.code,{children:(0,n.jsxs)(e.span,{className:"line",children:[(0,n.jsx)(e.span,{style:{color:"#4078F2","--shiki-dark":"#61AFEF"},children:"moon"}),(0,n.jsx)(e.span,{style:{color:"#50A14F","--shiki-dark":"#98C379"},children:" test"}),(0,n.jsx)(e.span,{style:{color:"#986801","--shiki-dark":"#D19A66"},children:" --md"})]})})})}),"\n",(0,n.jsx)(e.h2,{id:"ide-updates",children:"IDE Updates"}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:["\n",(0,n.jsxs)(e.p,{children:["IDE now supports syntax highlighting for ",(0,n.jsx)(e.code,{children:"mbti"})," files.\r\n",(0,n.jsx)(e.img,{alt:"highlight.png",src:i(61765).A+"",width:"1280",height:"1060"})]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["\n",(0,n.jsxs)(e.p,{children:["Codelens in the IDE now includes emojis.\r\n",(0,n.jsx)(e.img,{alt:"emoji.png",src:i(69387).A+"",width:"2080",height:"752"})]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:["\n",(0,n.jsxs)(e.p,{children:["Markdown files with a ",(0,n.jsx)(e.code,{children:"*.mbt.md"})," suffix now enable MoonBit LSP support (including error messages, completion, etc.)."]}),"\n"]}),"\n"]})]})}function h(s={}){const{wrapper:e}={...(0,r.R)(),...s.components};return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(t,{...s})}):t(s)}},69387:(s,e,i)=>{i.d(e,{A:()=>l});const l=i.p+"assets/images/emoji-be37491b288d25513ceeeffdb568e9a8.png"},61765:(s,e,i)=>{i.d(e,{A:()=>l});const l=i.p+"assets/images/highlight-1ffc9adb9b748a5a9200d3230899ddea.png"},98703:(s,e,i)=>{i.d(e,{R:()=>a,x:()=>c});var l=i(79474);const n={},r=l.createContext(n);function a(s){const e=l.useContext(r);return l.useMemo((function(){return"function"==typeof s?s(e):{...e,...s}}),[e,s])}function c(s){let e;return e=s.disableParentContext?"function"==typeof s.components?s.components(n):s.components||n:a(s.components),l.createElement(r.Provider,{value:e},s.children)}},97794:s=>{s.exports=JSON.parse('{"permalink":"/updates/2025/03/24/index","source":"@site/updates/2025-03-24/index.md","title":"2025-03-24","description":"Language Updates","date":"2025-03-24T00:00:00.000Z","tags":[],"readingTime":5.54,"hasTruncateMarker":false,"authors":[],"frontMatter":{},"unlisted":false,"prevItem":{"title":"2025-04-07","permalink":"/updates/2025/04/07/index"},"nextItem":{"title":"2025-03-10","permalink":"/updates/2025/03/10/index"}}')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.