spiegel-keyman/developer/src/kmc-kmn
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
test chore: Merge branch 'feature-kmc-kmw' into chore/merge-master-into-feature-kmc-kmw-a17s16-start 2023-06-26 14:33:20 +07:00
.eslintrc.cjs refactor(developer): kmc-kmw becomes component of kmc-kmn 2023-06-20 11:52:23 +07:00
.gitignore chore(developer): more polish on wasm interfaces 2023-03-23 10:58:09 +07:00
build.sh refactor(developer): kmc-kmw becomes component of kmc-kmn 2023-06-20 11:52:23 +07:00
Makefile feat(developer): kmc-kmn tdd framework 2023-03-23 10:14:25 +07:00
package.json refactor(developer): kmc-kmw becomes component of kmc-kmn 2023-06-20 11:52:23 +07:00
tsconfig.json refactor(developer): kmc-kmw becomes component of kmc-kmn 2023-06-20 11:52:23 +07:00