Skip to content
Compiles InChI C source to WebAssembly.
HTML JavaScript Shell C
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
inchi @ 0427bc7
lib
src
web
.gitignore
.gitmodules
COPYRIGHT
LICENSE-MIT
README.md

README.md

InChI-Wasm

Compiles a molfile to InChI function written in C and linked to the InChI C library to WebAssembly.

Instructions

For an overview of the procedure, see Compiling C to WebAssembly and Running It - without Emscripten.

To summarize:

  1. Install LLVM on your platform. On macOS, that probably means installing through Homebrew.
  2. Activate LLVM, if necessary. macOS users will need to append the LLVM bin path to the PATH environment variable. Something like export PATH=/usr/local/opt/llvm/bin:$PATH should work.
  3. Verify that LLVM is working with llc --version. The output should include wasm32 and wasm64.
  4. Clone, compile, and install wasi-libc.
  5. Copy the file libclang_rt.builtins-wasm32.a to your local LLVM bin/wasi directory.

From there, you can compile this project with:

cd inchi-wasm
bin/build.sh

License

InchI-Wasm is distributed under the terms of the MIT License. See LICENSE-MIT and COPYRIGHT for details.

You can’t perform that action at this time.