forked from dttvn0010/mecab_dart
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompile_wasm_embed.sh
More file actions
executable file
·23 lines (20 loc) · 915 Bytes
/
Copy pathcompile_wasm_embed.sh
File metadata and controls
executable file
·23 lines (20 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
SOURCE_PATH="src/unix"
emcc -std=c++11 -Wno-register -O3 \
-s EXPORTED_FUNCTIONS="['_malloc', '_free', '_destroyMecab']" \
-s EXPORTED_RUNTIME_METHODS="['wasmExports']" \
-s MODULARIZE=1 \
-s ALLOW_MEMORY_GROWTH \
-s EXPORT_NAME="libmecab" \
--embed-file "assets/ipa dic/@assets/ipadic/" \
-s FORCE_FILESYSTEM \
-s ASSERTIONS \
-I $SOURCE_PATH/ \
-I $SOURCE_PATH/../ \
$SOURCE_PATH/param.cpp $SOURCE_PATH/string_buffer.cpp \
$SOURCE_PATH/char_property.cpp $SOURCE_PATH/tagger.cpp \
$SOURCE_PATH/connector.cpp $SOURCE_PATH/tokenizer.cpp \
$SOURCE_PATH/context_id.cpp $SOURCE_PATH/dictionary.cpp $SOURCE_PATH/utils.cpp \
$SOURCE_PATH/viterbi.cpp $SOURCE_PATH/writer.cpp $SOURCE_PATH/iconv_utils.cpp \
$SOURCE_PATH/eval.cpp $SOURCE_PATH/nbest_generator.cpp $SOURCE_PATH/libmecab.cpp \
$SOURCE_PATH/../dart_ffi.cpp \
-o emcc_out/libmecab.js