OpenGolfCoach Core Library
This is the core Rust implementation that powers all language bindings.
Building
WebAssembly (for JavaScript/Node.js)
# Install wasm-pack if you haven't already
# Build for web
# Build for Node.js
# Build for bundlers (webpack, etc.)
Native Library (for C++/Python/Unity/Unreal)
# Build release version
# The compiled library will be in target/release/
# - libopengolfcoach.so (Linux)
# - libopengolfcoach.dylib (macOS)
# - opengolfcoach.dll (Windows)
Running Tests
API
The core library provides two main interfaces:
1. WebAssembly Interface (for JavaScript/TypeScript)
2. C FFI Interface (for C++/C#/Python)
pub extern "C"
Returns:
0on success-1if input/output pointers are null-2if input string is not valid UTF-8-3if JSON parsing failed-4if JSON serialization failed-5if output string conversion failed-6if output buffer is too small