live2d-cubism-core-sys 0.1.0

Raw FFI bindings to the Live2D Cubism SDK Native Core (v5). Does not bundle the proprietary Cubism Core library — users must obtain it separately from Live2D.
Documentation
  • Coverage
  • 15.05%
    14 out of 93 items documented0 out of 4 items with examples
  • Size
  • Source code size: 20.01 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.81 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 57s Average build duration of successful builds.
  • all releases: 57s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • jz315/SkyEngine
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jz315

live2d-cubism-core-sys

Raw Rust FFI bindings to the Live2D Cubism SDK Native Core (v5).

This crate does not include the Live2D Cubism Core library. You must download the SDK separately from the Live2D official site and accept its license agreement before use.

The MIT license of this crate covers only the Rust binding code, not the Cubism Core library itself.

Quick Start

1. Install the crate

[dependencies]
live2d-cubism-core-sys = "0.1"

2. Download the Cubism SDK for Native

Get it from: https://www.live2d.com/en/download/cubism-sdk/

3. Set the SDK path and build

Option A — Point to the full SDK root:

$env:LIVE2D_CUBISM_SDK_NATIVE_DIR = "C:\CubismSdkForNative-5-r.5"
cargo build

Option B — Point directly to the Core library and include directories (useful for CI, Nix, vcpkg, or custom layouts):

$env:CUBISM_CORE_LIB_DIR = "C:\CubismSdkForNative-5-r.5\Core\lib\windows\x86_64\143"
$env:CUBISM_CORE_INCLUDE_DIR = "C:\CubismSdkForNative-5-r.5\Core\include"
cargo build

Option B takes priority over Option A when both are set.

Environment Variables

Variable Description
CUBISM_CORE_LIB_DIR Direct path to the directory containing the Core static library. Highest priority.
CUBISM_CORE_INCLUDE_DIR Direct path to the Core header directory. Used alongside CUBISM_CORE_LIB_DIR.
LIVE2D_CUBISM_SDK_NATIVE_DIR Root of the Cubism SDK for Native installation. The build script derives lib/include paths from the standard SDK directory layout.

Platform Support

Target Library Status
x86_64-pc-windows-msvc Live2DCubismCore_MD.lib (v143/142/141) ✅ Tested
x86_64-apple-darwin libLive2DCubismCore.a ✅ Supported
aarch64-apple-darwin libLive2DCubismCore.a ✅ Supported
x86_64-unknown-linux-gnu libLive2DCubismCore.a ✅ Supported

Note: Windows builds require the MSVC toolchain. MinGW is not supported by the Cubism Core library.

SDK Compatibility

Tested against: Cubism SDK for Native 5-r.5

This crate tracks the Cubism Core v5 ABI surface. The crate version follows semver independently of the SDK version. If upstream FFI symbols change, the crate minor or major version will be bumped accordingly.

What's Included

  • Opaque type declarations (csmMoc, csmModel)
  • All public C function bindings (version, moc, model, parameters, parts, drawables, offscreens)
  • SDK v5 constants and flag definitions
  • Alignment constants (ALIGN_OF_MOC = 64, ALIGN_OF_MODEL = 16)

All bindings are hand-written (not bindgen-generated) to keep the published content minimal and the licensing boundary clear.

License

This crate is licensed under the MIT License.

The Live2D Cubism Core library is proprietary software licensed under the Live2D Proprietary Software License Agreement. This crate does not distribute any part of the Cubism Core library.