@@ -66,6 +66,54 @@ If needed, a section can be split into subsections with a "------" delimiter.
6666
6767## Library & Tooling Updates
6868
69+ ### [ Langcraft]
70+
71+ The Minecraft LLVM target you've never wanted.
72+
73+ This project started as a dare to the ` #lang-dev ` channel of the Rust
74+ Community Discord: How good programming language nerds could they really
75+ be, they can't even run Rust in Minecraft yet! So, naturally,
76+ someone took up the challenge. The goal was to compile Rust code to run
77+ as [ Minecraft data packs] ( https://minecraft.gamepedia.com/Data_Pack ) ,
78+ but since Rust uses the LLVM code generation framework it turned out to
79+ be easiest to add another compiler target to LLVM itself. This means
80+ that, theoretically, any LLVM-based compiler can now output a Minecraft
81+ map that executes its code, such as ` clang ` , ` emscripten ` or others!
82+ However, so far this has only actually been made to work for Rust.
83+
84+ How does this work? Minecraft data packs are essentially a
85+ deliberately-limited in-game scripting language that can do some basic
86+ math, as well as manipulate the game world such as moving objects
87+ around, creating new blocks, and other such things. These get put
88+ together into custom game rules for Minecraft world that uses the world
89+ as memory and executes your program. To quote the author from a Reddit
90+ thread:
91+
92+ > Well, scoreboard objectives support all the basic arithmetic
93+ > operations: Add/sub/div/mul/mod. Bitshifts can be made out of those by
94+ > looping over the bits. Pointers are used by moving an armor stand
95+ > around inside a huge array of jukeboxes with NBT for memory. And
96+ > execute has really really nice conditional branching. So you can
97+ > actually replicate pretty much every feature of an arch you'd ever
98+ > need!
99+
100+ So, maybe not quite as visually impressive as a gigantic redstone
101+ computer circuit, but much faster. And you still do get to watch the
102+ "pointer" armor stand teleport around memory.
103+
104+ Not content with that, of course, the project also includes a (very
105+ simple) interpreter for Rust code that can output text to the in-game
106+ console. This means that if you have enough time and a small
107+ and simple enough Rust program, you can run it from inside Minecraft and
108+ it will function. Slowly.
109+
110+ This is all, naturally, entirely useless. The project is also still
111+ heavily work-in-progress and does not pretend to be stable. On the
112+ other hand, it does work for simple programs, you can see a video of the
113+ Rust interpreter running Fizzbuzz
114+ [ here] ( https://www.youtube.com/watch?v=Cx0w5Wn9pPU ) . The next goal is
115+ apparently a CHIP-8 interpreter.
116+
69117## Popular Workgroup Issues in Github
70118
71119<!-- Up to 10 links to interesting issues -->
0 commit comments