Commit Graph

31 Commits

Author SHA1 Message Date
Behdad Esfahbod a53690a937 [wasm-shape] Minor rename 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 3226b4342b [wasm-shape] Use hb allocators 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 7b1c5e86ae [wasm-shape] Minor conditionalize allocation 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 6311b72fcc [wasm-shape] Shuffle code around 2023-03-31 17:33:45 -06:00
Behdad Esfahbod faaae04359 [wasm-shape] Minor 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 65f7bac73c Revert "[wasm-shape] No need to set default runnint mode"
This reverts commit fa484fac08a868e885b3252522668824f0f0fe71.
2023-03-31 17:33:45 -06:00
Behdad Esfahbod d894a10699 [wasm-shape] Debug message 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 0d237d062e [wasm-shape] No need to set default runnint mode
It's detected automatically apparently.
2023-03-31 17:33:45 -06:00
Behdad Esfahbod 4bdfaeecef [wasm-shape] Set glyph flags 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 77f0f3c11a [wasm-api] Make buffer_copy_contents return zero length on mem fail 2023-03-31 17:33:45 -06:00
Behdad Esfahbod 2568890d15 [wasm-shape] Retry shaping if out-of-memory 2023-03-31 17:33:45 -06:00
Behdad Esfahbod cb382e489d [wasm-shape] Cache wasm-shape-plan 2023-03-31 17:33:44 -06:00
Behdad Esfahbod 73de7d4d05 [wasm-api] Add shape_plan 2023-03-31 17:33:44 -06:00
Behdad Esfahbod a267249930 [wasm] Typo 2023-03-31 17:33:44 -06:00
Behdad Esfahbod aa8f9eed63 [wasm-shape] Use JIT running-modes if available
Build wasm-micro-runtime with:

$ cmake . -DWAMR_BUILD_REF_TYPES=1 -DWAMR_BUILD_FAST_JIT=1

or:

$ cmake . -DWAMR_BUILD_REF_TYPES=1 -DWAMR_BUILD_JIT=1

The latter needs llvm and is harder to get working. Still trying.
2023-03-31 17:33:44 -06:00
Behdad Esfahbod 1c6d640e1f [wasm-shaper] Whitespace 2023-03-31 17:33:44 -06:00
Behdad Esfahbod 9f8ad3928a [wasm-api] Bind shaper features 2023-03-31 17:33:44 -06:00
Behdad Esfahbod 2327fe9d8a [hb-wasm] Remove TODO 2023-03-31 17:33:44 -06:00
Behdad Esfahbod 863ec70e12 [wasm-shape] Add TODO items 2023-03-31 17:33:44 -06:00
Behdad Esfahbod 07ece17495 [wasm-graphite] Initial code 2023-03-31 17:33:44 -06:00
Behdad Esfahbod 747dcf561d [wasm] Strong typing for object references
Such that wasm cannot crash us by passing wrong object refs.

https://github.com/bytecodealliance/wasm-micro-runtime/discussions/1987

It still is unsafe if some code in the process other than HarfBuzz
registers refs with wasm-micro-runtime, since wasm_externref_ref2obj()
takes no context variable and looks up refs globally :(.

Maybe I fix that later by keeping a hash table of ref->obj-type instead.
2023-03-31 17:33:44 -06:00
Behdad Esfahbod 42d121ae79 [wasm] Add hb-wasm-api.cc 2023-03-31 17:33:44 -06:00
Behdad Esfahbod bb8a04cbad [wasm] Remove the print(returnval) and use it to fail shaper 2023-03-31 17:33:44 -06:00
Behdad Esfahbod 9f4dc2e103 [wasm] Bind native API 2023-03-31 17:33:44 -06:00
Behdad Esfahbod e79a7318c4 [wasm] Start adding wasm-api 2023-03-31 17:33:44 -06:00
Behdad Esfahbod 11c6d46086 [wasm] Pass font & buff to shape() function 2023-03-31 17:33:44 -06:00
Simon Cozens 05bf984212 Add a simple callback native function 2023-03-31 17:33:44 -06:00
Behdad Esfahbod bdbc1568ba [wasm] Port from c_api to wasm-micro-runtime wasm_runtime API 2023-03-31 17:33:44 -06:00
Behdad Esfahbod db8e51e01b [wasm] More boilerplate 2023-03-31 17:33:44 -06:00
Behdad Esfahbod fcc8be409b [wasm] Add meson build option
Autotools support missing.
2023-03-31 17:33:44 -06:00
Behdad Esfahbod 425fc7f3ee [wasm] Add wasm shaper skeleton 2023-03-31 17:33:44 -06:00