Relates to #5069.
This establishes a baseline Rust build environment and linkage with
common/core/desktop.
This includes:
* build script build.sh which handles builds on Windows, macOS, *nix,
with multiple targets on Windows only at present (M1 on mac to come
when we do the mac integration work.)
* a mock rust processor with a very stubbed-out implementation
* bare bones interface between Rust library and C++ code
* unit tests on Rust and integration tests on C++ side to test the
linkage between the libraries.
This should deliver a set of libraries that can be linked into our
target applications. For ease of deployment, it may be best to make
these static libraries, but I haven't made that decision at this point.
Matches work completed in #5169 for Keyman Core, kmx_file.cpp.
While this code will hopefully disappear in 15.0, it's good to make sure
we aren't diverging beforehand.
Also tidies up a couple of other cases in `CopyKeyboard` in Keyman Core.
When working on a new build script, I tripped over the `-?` question
mark help parameter here, as it needs to be escaped. Opted to fix all
the instances in our scripts, although AFAICT there would not have been
current bugs arising from this, as there were no conflicting one
character options lower in the case list.
This change fixes the FixupKeyboard method. In the .kmx files on
disk array pointers for an empty array point to the end of the file
(one byte after the end of the data structure). When we expand the
pointers in FixupKeyboard this leads to `cgp->dpKeyArray` to point to an
unallocated memory location - this shouldn't matter since we don't
try to read or write at this location if the Key array is empty,
but armhf still seems to raise a SIGBUS, probably because we cast
the value to a `LPKEY`. This change sets `cgp->dpKeyArray` to `NULL`
if we have an empty key array, similar to what's done for the strings.
Closes#5072.
s390x is big-endian which we currently don't support (#5111).
Only build on architectures supported by Debian. This excludes the
following little-endian architectures:
alpha arm ia64 riscv64 sh4 x32 arm64ilp32 mipsn32el
and the following big-endian ones:
avr32 hppa m68k mips mips64 mipsn32 powerpc ppc64 s390 sparc sparc64
See https://wiki.debian.org/SupportedArchitectures
and https://wiki.debian.org/ArchitectureSpecificsMemo
Compiling on armhf outputs two warnings:
- NULL used in arithmetic [-Wpointer-arith] (line 289 and 290)
- unused parameter ‘dwFileSize’ [-Wunused-parameter] (line 264)
(related to #5072)