harfbuzz / harfbuzzjs

Providing HarfBuzz shaping library for client/server side JavaScript projects
https://harfbuzz.github.io/harfbuzzjs/
Other
204 stars 35 forks source link

hb.wasm / harfbuzz.wasm #17

Closed simoncozens closed 4 years ago

simoncozens commented 4 years ago

build.sh builds harfbuzz.wasm:

wasm-opt -Oz a.out -o harfbuzz.wasm && rm a.out

index.js includes hb.wasm:

  fs.readFile(path.resolve(__dirname, 'hb.wasm'), function (err, data) {
ebraminio commented 4 years ago

fixed, removed wasm-opt call to show how simple the whole thing is just if we avoid a libc.