Skip to content

Instantly share code, notes, and snippets.

@XdarkX
XdarkX / SimpleHarmonyTranspilerTutorial.md
Created November 7, 2020 15:48 — forked from pardeike/SimpleHarmonyTranspilerTutorial.md
Simple Harmony Transpiler Tutorial

About
A hopefully easy tutorial on how to make a Transpiler with Harmony
Based on patching a method in the game RimWorld

Introduction

Writing transpilers is like writing a book about how to rewrite a cookbook to make it work for the age of microwave even if that cookbook was written before microwave ovens were invented. It requires good knowledge about the language the cookbook is written in and the topics and information models the cookbook author uses.

As such, writing a transpiler is way more complex and low level than writing a simple method that prefixes, postfixes or replaces an existing method. It is required to have good understanding in general C# programming and how to manipulate abstract data structures with respect to references and relative positioning. It also requires to know the language, in this case CIL, so you can manipulate the instructions without it to get into an illegal state.

@XdarkX
XdarkX / introrx.md
Created June 15, 2020 19:20 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@XdarkX
XdarkX / BUILDING.md
Created August 9, 2019 05:48 — forked from yan12125/BUILDING.md
Build a custom kernel for Android emulator
git clone https://android.googlesource.com/kernel/goldfish/ -b android-goldfish-3.18
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9
cd goldfish
export CROSS_COMPILE=x86_64-linux-android-
export ARCH=x86_64
export PATH=$PATH:/path/to/x86_64-linux-android-4.9/bin
make x86_64_ranchu_defconfig
make menuconfig  # enable overlayfs and namespaces support here
make -j8