Commit graph

1055 commits

Author SHA1 Message Date
Marc Durdin
a8093460fd
Merge branch 'epic/web-core' into chore/merge-master-into-web-core 2024-11-08 05:29:28 +01:00
Marc Durdin
fbab6eb8cf chore(core): move API docs from help.keyman.com
Reorganizes /core/doc to /core/docs and moves internal files
accordingly.

Depends-on: keymanapp/help.keyman.com#1684
2024-11-07 08:28:33 +07:00
Eberhard Beilharz
fd629c574e
feat(core): rename core.js to km-core.js 2024-10-18 18:59:40 +02:00
Eberhard Beilharz
ebc5f82542
Merge pull request #12550 from keymanapp/fix/core/debugbuild
fix(core): fix generated `core.js` file for debug builds 🎼
2024-10-17 09:46:47 +02:00
Eberhard Beilharz
998ad76632
fix(core): fix generated core.js file for debug builds
Due to emscripten bug emscripten-core/emscripten#22754 specifying only
`webview` as environment resulted in a broken `core.js` file when doing
a debug build. In release builds things worked because of the
`-Wl,-O1 -O2` that meson added for the release build. This change works
around that bug by adding `web` as additional environment.
2024-10-16 20:43:17 +02:00
Eberhard Beilharz
ba7589e6b6
fix(core): cleanup include directories
This fixes a meson warning that `common/include` was specified
multiple times (in `core/include/meson.build` and
`core/tests/meson.build`).
2024-10-16 20:42:31 +02:00
Eberhard Beilharz
de863c23f2
chore(core): Merge remote-tracking branch 'origin/epic/web-core' into feat/core/kbd_from_blob 2024-10-09 10:51:17 +02:00
Eberhard Beilharz
11a2a3ba3a
feat(core): fix compilation error on Windows 2024-10-08 17:39:06 +02:00
Eberhard Beilharz
052ae2ec35
feat(core): fix build failure on Windows 2024-10-07 18:05:00 +02:00
Eberhard Beilharz
069cd21ecd
feat(core): address code review comments
- rename `km_core_keyboard_load_from_blob_internal` to
  `keyboard_load_from_blob_internal` since it's not part of the API
- use size of struct instead of hard-coding minimum KMX file size
2024-10-07 18:04:41 +02:00
Eberhard Beilharz
1c88166f6e
feat(core): instantiate different processor types in processor_factory
This moves instantiating the different processor types back to the
`processor_factory` by adding a new `is_handled` static method on the
different processors. Also addresses other code review comments.

Also add some more unit tests.
2024-10-02 18:47:18 +02:00
Eberhard Beilharz
d06aa29956
feat(core): implement loading KMX from blob
- split keyboard loading into loading KMX file into blob and then
  loading the keyboard processor from the blob.
- deprecate `km_core_keyboard_load`
- move file access next to deprecated method. This is now the only place
  that loads a file in Core; unit tests have some more places that
  load files.
- introduce GTest and add unit tests for loading from blob

Part-of: #11293
2024-09-24 16:30:39 +02:00
Marc Durdin
9ebd1a9b0a
Merge branch 'epic/web-core' into chore/merge-master-into-web-core 2024-09-13 08:09:24 +02:00
Darcy Wong
e62d05cff7 fix(core): Disable test_unicode check for ICU version 2024-09-11 20:56:50 +07:00
Eberhard Beilharz
8e53666905
Merge pull request #12332 from keymanapp/feat/web/layoutspec
feat(core): spec out Core API extensions 🎼
2024-09-06 21:28:58 +07:00
Eberhard Beilharz
bc46458368
feat(web): address code review comments 2024-09-06 12:44:36 +02:00
Eberhard Beilharz
59019cc8b7
feat(linux): add blob size parameter
Addresses code review comments.
2024-09-05 18:11:32 +02:00
Eberhard Beilharz
165829beb5
Merge branch 'epic/web-core' into chore/merge-master-into-web-core 2024-08-30 15:17:47 +07:00
Eberhard Beilharz
1deaa323ad
feat(core): spec out API extensions
- loading a keyboard from a BLOB
- getting the on-screen keyboard layout from Core. This is an internal-
  only API because of it's use of C++.

Part-of: #11293
Part-of: #8093
2024-08-30 14:44:40 +07:00
Eberhard Beilharz
eb33c53b9c
chore(core): address code review comments 2024-08-26 15:10:43 +07:00
Marc Durdin
96f288a83d fix(core): properly support 'other' modifier state with uint32_t type
While the modifier state property in core's API is 16-bit, internally
ldml_processor supports the modifier flag LDML_KEYS_MOD_OTHER with a
value of `0x10000`, which requires widening the value (we match the
32-bit size of the KMX_DWORD value from KMX+).

Note: this is not yet well unit-tested.

Relates-to: #11072
Fixes: #12057
2024-08-24 12:26:52 +08:00
Marc Durdin
1a8d8a771b
Merge branch 'epic/web-core' into feat/web/core 2024-08-22 15:29:47 +02:00
Eberhard Beilharz
f6c8229064
feat(web): don't use deprecated emcc parameter 2024-08-21 09:20:10 +02:00
Eberhard Beilharz
0abc250af3
feat(web): POC of Core WASM integration into Keyman Web
- add temporary function to Core for this POC
- add new CoreProcessor to access Keyman Core WASM
- add unit tests for new core processor
- add code to KeymanEngine and InputProcessor to load the new CoreProcessor
- add web server to manual tests and new action `start` to build script

This change requires the manual tests to be loaded from a web server
instead of loaded as file, because otherwise the wasm code won't be
loaded.

Currently we always load CoreProcessor. This should be improved in a future
change to only load when it is actually needed.

Part-of: #11293
2024-08-20 22:45:39 +02:00
Eberhard Beilharz
153683cfb0
fix(core): look for emcc instead of emcc.py on Linux and Mac
`emcc.py` is not marked as executable in emcripten's git repo so the
build failed when trying to locate emscripten. However, it turns out
that `emcc` is marked as executable, so we use that instead.

On Windows however, we still need to use `emcc.py` because otherwise
Meson won't detect it as valid compiler.
2024-08-20 22:45:30 +02:00
Eberhard Beilharz
a98ee7040b
Merge pull request #12235 from keymanapp/fix/core/emcc_detect
fix(core): look for `emcc` instead of `emcc.py`
2024-08-20 22:41:46 +02:00
Eberhard Beilharz
ab3722ecfa
fix(core): look for emcc instead of emcc.py on Linux and Mac
`emcc.py` is not marked as executable in emcripten's git repo so the
build failed when trying to locate emscripten. However, it turns out
that `emcc` is marked as executable, so we use that instead.

On Windows however, we still need to use `emcc.py` because otherwise
Meson won't detect it as valid compiler.
2024-08-20 15:52:52 +02:00
Steven R. Loomis
7c0f51c486 fix(core): set mac build version for meson cli build to 10.13
- add as option to compiler
- Match version in #11302

Fixes: #11423
2024-08-19 10:22:10 -05:00
Marc Durdin
bad54e4fed
Merge pull request #12171 from keymanapp/refactor/core/make-utfcodec-common
refactor(core): move utfcodec to common
2024-08-14 19:10:16 +10:00
Marc Durdin
613bdb6c19 refactor(core): move utfcodec to common
Refactor to support codecvt cleanup work in kmcmplib.
2024-08-13 15:04:07 +02:00
Marc Durdin
859c88a6de docs: add .kmx specification
Fixes: #11407
2024-08-12 17:04:24 +07:00
Marc Durdin
05edc8a7ce
Merge branch 'master' into refactor/windows/cleanup-engine-logging 2024-07-23 17:29:55 +10:00
Eberhard Beilharz
88f6c95803
fix(core): allow to successfully build on Ubuntu 24.04
Without this change trying to build on Ubuntu 24.04 fails with
"error: 'intptr_t' has not been declared in '::'". I'm not sure
why that is happening, but this is an easy fix.
2024-07-04 13:07:10 +02:00
Marc Durdin
1be73a9c2e refactor(windows): clean up logging
* Remove unused parameters from SendDebugMessage functions
* Add SendDebugEntry and SendDebugExit functions for tracking
  function entry/exit
* Add indenting and function names to log entries
* Remove unused debug functions
* Eliminate now-unused hwnd parameter in initialization functions
* Replace Log,LogEntry,LogExit functions with SendDebug equivalents in
  kmtip

Many functions now have SendDebugEntry/SendDebugExit (or
return_SendDebugExit) pairs. It is important to SendDebugExit on all
returns from a function to keep the log indent depth consistent. In some
cases I chose not to add these logging calls, e.g. on frequently called
functions such as the message hooks.
2024-07-03 21:28:37 +10:00
Steven R. Loomis
a16608e229
Merge branch 'master' into test/core/10968-minimum-ldml-test 2024-06-17 08:24:11 -05:00
Steven R. Loomis
38c6fe1ba3
Merge pull request #11778 from keymanapp/feat/core/9467-remove-icu-for-wasm-epic-ldml
feat(core): remove ICU from core under wasm 🙀
2024-06-17 08:22:38 -05:00
Steven R. Loomis
e580043538
Merge pull request #11777 from keymanapp/feat/core/9467-devolve-regex-to-js2-epic-ldml
feat(core): devolve regex to javascript 🙀
2024-06-17 08:22:22 -05:00
Marc Durdin
d6992097fd
Merge pull request #11795 from keymanapp/fix/core/11794-serialize-core-tests-temporary-mitigation
fix(core): serialize tests for core/wasm on mac agents
2024-06-17 16:26:27 +10:00
Marc Durdin
db53ac1343 fix(core): serialize tests for core/wasm on mac agents
Mitigates: #11794
2024-06-16 16:42:38 +10:00
Steven R. Loomis
ed80095ab9
Merge branch 'master' into test/core/10968-minimum-ldml-test 2024-06-14 09:33:29 -05:00
Steven R. Loomis
2300571ad8 test(core): fix a type conversion issue in the minimal test
- need a null string for either narrow or wide chars

Fixes: #10968
2024-06-14 09:05:50 -05:00
Steven R. Loomis
ca34550a8d feat(core): update util_regex per review comments
- remove some TODOs that were obsolete
- copy/clarify/expand comments between the ICU and non-ICU sides

Fixes: #9467
2024-06-14 08:55:15 -05:00
Steven R. Loomis
3c82343218 test(core): Add a minimal test that exercises the core API
- this test doesn't actually run well, it compiles but fails with an assertion.
- the purpose is to exercise the linker.

Fixes: #10968
2024-06-13 16:56:36 -05:00
Steven R. Loomis
b2e3215b0b
Merge branch 'feat/core/9467-devolve-regex-to-js2-epic-ldml' into feat/core/9467-remove-icu-for-wasm-epic-ldml 2024-06-13 14:29:18 -05:00
Steven R. Loomis
ff3c9736f4
Merge branch 'master' into feat/core/9467-devolve-regex-to-js2-epic-ldml 2024-06-13 14:29:01 -05:00
Steven R. Loomis
edd42d1dcb
Merge pull request #11541 from keymanapp/feat/core/9467-devolve-norm-to-js3-epic-ldml
feat(core): devolve normalization to js 🙀
2024-06-13 14:28:45 -05:00
Steven R. Loomis
a744afc34f feat(core): remove ICU from core under wasm
Fixes: #9467
2024-06-13 14:20:58 -05:00
Steven R. Loomis
1a61a589b3 feat(core): devolve regex to js for wasm
- assert was wrong!

Fixes: #9467
2024-06-13 13:07:29 -05:00
Steven R. Loomis
263d0e32f2 chore(core): update comments and remove a raw numeric literal
- per review comments

Fixes: #9467

Co-authored-by: rc-swag <58423624+rc-swag@users.noreply.github.com>
2024-06-13 12:17:55 -05:00
Marc Durdin
577986bb50
Merge pull request #11523 from keymanapp/chore/common/8399-cleanup-meson-warnings
chore(common): cleanup meson deprecations and warnings
2024-06-08 10:46:41 +10:00