Rust Data Structures – Skip List

A skip list is an ordered data structure based on a linked list that allows for fast lookups and insertions. The time complexity for insertion, lookup, and deletion is O(log N), and it remains sorted after these operations. Redis’s SortedSet data type is implemented using a skip list. The skip list is an elegant data…

Read More

Dual publish ESM and CJS with tsdown

There comes a time when you have to dual publish ESM (ECMAScript) and CJS (CommonJS) for your TypeScript projects. This guide should walk you through the steps to get this working properly with tsdown. NOTE: if you are using tsup there is a codemod provided by tsdown to migrate. tsdown setup First let’s install tsdown…

Read More