Skip to content

Instantly share code, notes, and snippets.

View H-Plus-Time's full-sized avatar

Nicholas Roberts H-Plus-Time

  • Melbourne, Australia
  • 20:15 (UTC +11:00)
View GitHub Profile
@H-Plus-Time
H-Plus-Time / allocator_track.rs
Last active September 17, 2024 10:03
Basic 'how much is allocated' tooling for rs wasm modules
use std::alloc::{System, GlobalAlloc, Layout};
use std::sync::atomic::{AtomicUsize, Ordering::Relaxed};
use wasm_bindgen::prelude::*;
struct Counter;
static ALLOCATED: AtomicUsize = AtomicUsize::new(0);
unsafe impl GlobalAlloc for Counter {
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
@H-Plus-Time
H-Plus-Time / formatted.d.ts
Created February 9, 2024 08:08
Ezno generated types comparison.
/* tslint:disable */
/* eslint-disable */
/**
* @returns {any}
*/
export function get_version(): any;
export interface FailedBuildOutput {
diagnostics: DiagnosticsContainer;
}
@H-Plus-Time
H-Plus-Time / oxc_wasm.d.ts
Last active January 24, 2024 11:53
oxc_wasm typegen
/* tslint:disable */
/* eslint-disable */
/**
*/
export function main(): void;
export interface Oxc {
source_text: string;
ast: Program;
ir: Statement[];
symbols: JsValue;
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
<template>
<style>