Skip to content

Instantly share code, notes, and snippets.

@CryZe
CryZe / SplitScriptVsJai.md
Created September 1, 2026 19:59
SplitScript vs Jai

SplitScript vs Jai

Feature SplitScript Jai
Development time 1 month 12 years
Static strong typing
Local type inference
Whole-program / bidirectional type inference ✅ Extensive ◐ Limited/different model
Generic functions
Generic data types
@CryZe
CryZe / AHatInTime.lua
Created February 15, 2026 17:41
A Hat in Time LibreSplit Auto Splitter
local function default_settings()
local s = {
settings_ILMode = false,
settings_newFileStart = true,
settings_gameTimeMsg = true,
splits = true,
splits_tp = true,
splits_tp_new = true,
splits_tp_any = true,
splits_tp_std = true,
@CryZe
CryZe / aoc_2024_17.rs
Last active December 30, 2024 19:03
Advent of Code 2024 Day 17 WebAssembly Compiler
use std::fs;
use gimli::{
write::{
Address, AttributeValue, DwarfUnit, EndianVec, Expression, LineProgram, LineString, Range,
RangeList, Sections, UnitEntryId,
},
Encoding, Format, LineEncoding, LittleEndian,
};
use wasm_encoder::{
@CryZe
CryZe / wasmtime_gc_out_of_memory.wat
Created December 8, 2024 21:02
Wasmtime GC Heap Out Of Memory Reproduction
(module
(type $u128 (struct (field $high (mut i64)) (field $low (mut i64))))
(type $7 (func))
(memory $0 1)
(export "update" (func $update))
(export "memory" (memory $0))
(func $update
(drop
(struct.new $u128
(i64.const 0)
@CryZe
CryZe / lexer.rs
Created November 16, 2024 17:39
Very simple lexer
struct Lexer<'a> {
input: &'a str,
total_len: usize,
}
impl<'a> Lexer<'a> {
fn new(input: &'a str) -> Self {
Self {
input,
total_len: input.len(),
@CryZe
CryZe / Cargo.toml
Created September 20, 2024 19:23
Rough websocket server that hosts the auto splitting runtime.
[package]
name = "liveplit-one-auto-splitter-server"
version = "0.1.0"
edition = "2021"
[dependencies]
livesplit-auto-splitting = { path = "P:\\livesplit-core\\crates\\livesplit-auto-splitting" }
tokio-tungstenite = "0.21.0"
tokio = { version = "1.37.0", features = ["macros", "rt", "sync"] }
futures-util = "0.3.30"
@CryZe
CryZe / lib.rs
Last active October 30, 2023 17:50
Protected memory
use std::{
marker::PhantomData,
mem,
ops::{Deref, DerefMut},
ptr::{self, NonNull},
};
use bytemuck::{AnyBitPattern, Zeroable};
mod utils;
@CryZe
CryZe / redfall.rs
Last active May 8, 2023 16:49
New abstraction for writing auto splitters
#![no_std]
use asr::{
future::{next_tick, retry},
signature::Signature,
timer, Process,
};
asr::panic_handler!();
@CryZe
CryZe / AutoSplittingRuntimeSupport.md
Last active June 14, 2023 08:42
A survey about programming language support for LiveSplit One's Auto Splitting Runtime

Auto Splitting Runtime Support

Supported languages

Rust

  • 👍 Modern language with really good WebAssembly support
  • 👍 Great ecosystem where most crates work perfectly fine in WebAssembly
  • 👍 Easy project setup
  • 👎 Ownership and borrowing make things a little harder
@CryZe
CryZe / asr.go
Created April 17, 2023 20:56
Bindings for LiveSplit One's Auto Splitting Runtime for TinyGo
package asr
import "time"
type TimerState = uint32
type ProcessId = uint64
type Address = uint64
func decodeString(text string) (*byte, uint) {
return decodeSlice(([]byte)(text))