Skip to content

Commit bbce1d4

Browse files
icefoxenozkriff
andauthored
Newsletter 12: Langcraft (#209)
* Basic summary of Langcraft. It's probably too long, and it needs a cool picture. Hmmmmm. * Try to shorten and combine author's feedback. * Remember to add Langcraft repo link * Newsletter 12: Langcraft: Style tweaks & img * Newsletter 12: Langcraft: optimize img Co-authored-by: Andrey Lesnikov <ozkriff@gmail.com>
1 parent 9241146 commit bbce1d4

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

content/posts/newsletter-012/index.md

+32
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,38 @@ tokio), all but a few worked out-of-the-box!
243243
[vulkan-renderer-prototype-video]: https://www.youtube.com/watch?v=Ks_HQbejHE4
244244
[moltenvk]: https://github.com/KhronosGroup/MoltenVK
245245

246+
### [Langcraft]
247+
248+
[Langcraft] is the Minecraft LLVM target you've never wanted.
249+
250+
Langcraft started as a dare to the `#lang-dev` channel of the Rust
251+
Community Discord to be able to parse Rust code in Minecraft.
252+
Naturally, it grew into a full code generator that can translate
253+
most LLVM IR to
254+
[Minecraft data packs](https://minecraft.gamepedia.com/Data_Pack),
255+
the game's deliberately-limited in-game scripting language. Langcraft
256+
is entirely language independent, so any language with an LLVM-based
257+
compiler can (with the right API bindings) run in Minecraft. Currently
258+
bindings to both C and Rust exist. While not as visually impressive as
259+
a redstone computer, Langcraft does stretch the bounds of the game quite
260+
a bit, using jukeboxes for memory, armor stands to represent pointers,
261+
and rearranging compiled code to make it run in the bounds of the data
262+
packs' fixed instruction limit.
263+
264+
This is all, naturally, entirely useless. The project is also still
265+
heavily work-in-progress and does not pretend to be stable, but it is
266+
usable. A handwritten interpreter for a Rust-like language has already
267+
been demonstrated running, and even more complex projects like [CHIP-8
268+
emulators](https://github.com/Dhole/chip8-rs.git) function (albeit at
269+
extremely slow speed).
270+
271+
You can watch a [video of Rust interpreter running Fizzbuzz][langcraft-video]:
272+
273+
[![youtube preview](longcraft-video.jpeg)][langcraft-video]
274+
275+
[Langcraft]: https://github.com/SuperTails/langcraft
276+
[langcraft-video]: https://youtube.com/watch?v=Cx0w5Wn9pPU
277+
246278
## Popular Workgroup Issues in Github
247279

248280
<!-- Up to 10 links to interesting issues -->
Loading

0 commit comments

Comments
 (0)