Behdad Esfahbod
e87b1b3ec3
[wasm-api] Try to add face_reference_table
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
980706441b
[wasm] Add hb-wasm-api-list.hh
2023-03-31 17:33:44 -06:00
Behdad Esfahbod
65efad6b59
[wasm] Make debugprint use debug API
2023-03-31 17:33:44 -06:00
Simon Cozens
36dd27bf3f
Just printf, don't take length
2023-03-31 17:33:44 -06:00
Behdad Esfahbod
62f3c7cf67
[wasm-api] Add macros for ref handling
2023-03-31 17:33:44 -06:00
Behdad Esfahbod
4c8a414a10
[wasm-api] Clean up debugprint
2023-03-31 17:33:44 -06:00
Behdad Esfahbod
63904538c8
[wasm-api] Use i32 instead of externref in API spec
...
Oh well...
2023-03-31 17:33:44 -06:00
Simon Cozens
ed1a70c7e8
Only export debugprint when HB_DEBUG_WASM
2023-03-31 17:33:44 -06:00
Simon Cozens
89c50b0ccb
Fix debugprint format string
2023-03-31 17:33:44 -06:00
Behdad Esfahbod
fd1f7f46f4
[wasm-api] Implement font_get_face
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