weld-project / weld

High-performance runtime for data analytics applications
https://www.weld.rs
BSD 3-Clause "New" or "Revised" License
2.99k stars 258 forks source link

Corect weld-capi build.rs to support not only C++ but also C #505

Closed kaz7 closed 4 years ago

kaz7 commented 4 years ago

Hi,

Thank you for distributing weld. We've found one problem regarding to weld-capi when we tried CUDF from C.

The weld.h generated by weld-capi looks like something below. We needed #ifdef and #endif around the last line to use this from C.

#ifdef __cplusplus
extern "C" {
#endif

#ifndef _WELD_H_
#define _WELD_H_
...
#endif /* _WELD_H_ */

}

This PR should fix above problem.

Unfortunately, weld.h is not re-generateed automatically. In order to update weld.h, I needed following steps.

  1. rm weld-capi/weld.h
  2. cargo clean
  3. cargo build --releasae
sppalkia commented 4 years ago

Nice catch, thanks for the fix!