# 水了一个简单的 MoonBit Rust 语法对比

**URL:** <https://taolun.moonbitlang.com/t/topic/1067>\
**Category:** 代码帮助\
**Created:** [2024 年12 月 8 日 02:21 UTC](https://taolun.moonbitlang.com/t/topic/1067 "2024-12-08T02:21:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

作者： ![tiye](https://taolun.moonbitlang.com/user_avatar/taolun.moonbitlang.com/tiye/32/401_2.png) [@tiye](https://taolun.moonbitlang.com/u/tiye)\
发布日期： [2024 年12 月 8 日 02:21 UTC](https://taolun.moonbitlang.com/t/topic/1067/1 "2024-12-08T02:21:19Z")

</div>

模仿以前语言对比界面弄了一个玩, [MoonBit is like Rust](https://r.tiye.me/fp-china/moonbit-is-like-rust/)

有没有同学有兴趣帮忙再加一些 demo? 原来的代码片段也有点粗糙, 如果觉得不够好也可以帮忙改改.

---

<div class="post-metadata">

作者： ![TheWaWaR](https://taolun.moonbitlang.com/user_avatar/taolun.moonbitlang.com/thewawar/32/679_2.png) [@TheWaWaR](https://taolun.moonbitlang.com/u/TheWaWaR)\
发布日期： [2025 年3 月 10 日 11:02 UTC](https://taolun.moonbitlang.com/t/topic/1067/2 "2025-03-10T11:02:17Z")

</div>

能加上高亮就更完美了

---

<div class="post-metadata">

作者： ![tiye](https://taolun.moonbitlang.com/user_avatar/taolun.moonbitlang.com/tiye/32/401_2.png) [@tiye](https://taolun.moonbitlang.com/u/tiye)\
发布日期： [2025 年3 月 15 日 17:45 UTC](https://taolun.moonbitlang.com/t/topic/1067/3 "2025-03-15T17:45:03Z")

</div>

官方有没有纯 js 的 moonbit 语法高亮组件可以用用的?

---

<div class="post-metadata">

作者： ![ChenYubin](https://taolun.moonbitlang.com/letter_avatar_proxy/v4/letter/c/ee59a6/32.png) [@ChenYubin](https://taolun.moonbitlang.com/u/ChenYubin)\
发布日期： [2025 年3 月 17 日 02:17 UTC](https://taolun.moonbitlang.com/t/topic/1067/4 "2025-03-17T02:17:48Z")

</div>

可以用 [shiki](https://shiki.style/guide/load-lang) 加载moonbit的[tmlanguage](https://github.com/moonbitlang/moonbit-tmLanguage)配置实现高亮
