Compiles a molfile to InChI function written in C and linked to the InChI C library to WebAssembly.
For an overview of the procedure, see Compiling C to WebAssembly and Running It - without Emscripten.
- Install LLVM on your platform. On macOS, that probably means installing through Homebrew.
- Activate LLVM, if necessary. macOS users will need to append the LLVM
binpath to the
PATHenvironment variable. Something like
export PATH=/usr/local/opt/llvm/bin:$PATHshould work.
- Verify that LLVM is working with
llc --version. The output should include
- Clone, compile, and install wasi-libc.
- Copy the file libclang_rt.builtins-wasm32.a to your local LLVM
From there, you can compile this project with:
cd inchi-wasm bin/build.sh