spiegel-keyman/developer
Marc Durdin f2a7efa2ec fix(developer): kmcmplib was clobbering previous output
Running kmc on a set of keyboards would sporadically fail after some
time. It turns out this was related to memory allocation, specifically,
resizing the WASM module's memory buffer caused `TypedArray` views into
the memory to be reset!

By default, when a `Uint8Array` is created from an `ArrayBuffer` (e.g.
`Module.HEAP8.buffer`), it is a dynamic view into that buffer. This
module buffer can be dynamically reallocated at any time, which can
happen when allocating memory in WASM code (so the change will look
_really_ weird in a stack trace). Thus, to ensure we don't trip over
ourselves, we need to copy the buffer. Fortunately, creating a
`Uint8Array` from a `Uint8Array` copies the data, and is pretty quick.
2023-06-30 08:38:57 +07:00
..
src fix(developer): kmcmplib was clobbering previous output 2023-06-30 08:38:57 +07:00
.gitignore chore(developer): move server with no changes 2022-05-23 12:15:34 +10:00
build.sh refactor(developer): kmc-kmw becomes component of kmc-kmn 2023-06-20 11:52:23 +07:00