spiegel-keyman/common
Marc Durdin 56da64796f fix(common): specify alignment for COMP_ structs
When we read .kmx files, they have no alignment guarantees, so we need
to tell the compiler to generate unaligned-safe code for accesses to
`COMP_` structure members, because typically we point into the buffer
and read at any offset.

A .kmx file will generally be 2-byte aligned, as there are no structures
or data types with smaller than 2 byte widths. There is no requirement
that this be the case per the .kmx spec, though. So we use a 1 byte
alignment attribute for the compiler, so it will generate safe code when
reading these structs.

Note that we are assuming that `COMP_KEYBOARD` is aligned because it is
always the start of the file, so will be at the start of any buffer
which will automatically be aligned correctly.

We should probably review some of our design decisions and structs for
KMXPlus given this.
2023-06-30 08:29:20 +07:00
..
include fix(common): specify alignment for COMP_ structs 2023-06-30 08:29:20 +07:00
linux chore(common): run common and resources tests 2023-04-28 14:07:34 +07:00
mac chore(common): run common and resources tests 2023-04-28 14:07:34 +07:00
models chore(web): Merge branch 'chore/web/cleanup-kmw-headless-module-builds' into chore/web/esbuild-config-cleanup 2023-06-16 12:47:20 +07:00
predictive-text fix(common/models): missed fixing commands in common/predictive-text test script 2023-06-19 08:54:03 +07:00
resources chore(windows): address review comments 2022-06-16 04:47:53 +10:00
schemas chore: fix typo 2023-06-20 12:59:33 +07:00
test chore(web): Merge branch 'master' into chore/web/feature-esmodule-a17s14-mid-update 2023-06-06 12:37:15 +07:00
tools Merge branch 'master' into feature-esmodule-web-engine 2023-06-26 09:09:43 +07:00
web fix(developer): handle empty File Details in package reader 2023-06-28 07:27:42 +07:00
windows chore: cleanup unneeded changes 2023-06-08 15:13:59 +07:00
build.sh chore(common): run common and resources tests 2023-04-28 14:07:34 +07:00