upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/xma_decoder
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-24 20:59:12 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-24 20:59:12 -0500
commit46e078824d2b7a6ae8a8051d6adc7bf8011595cc (patch)
tree7d1f3d8843baaeaea36bc44fb6eff7723ccffe08 /runtime/xma_decoder
parentd3741102e4760cdff7ebf9ca91510b5d8f5c96f7 (diff)
docs: build the prebuilt XMA2 decoder yourself, from this checkout
Configure checks only that the file passed with -DLEONIDA_XMA2_DECODER_LIB exists, not which source, version or target it was built from. Say so, and give the command that builds the library from this checkout's runtime/xma_decoder for x86_64-pc-windows-msvc, where it lands, that it needs only the Rust target (so it works on Linux), that the option stops CMake from rebuilding the decoder after source changes, and that a relative path given with -D is resolved against the directory CMake runs in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/xma_decoder')
-rw-r--r--runtime/xma_decoder/README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/xma_decoder/README.md b/runtime/xma_decoder/README.md
index e279057be..f02bdcb0c 100644
--- a/runtime/xma_decoder/README.md
+++ b/runtime/xma_decoder/README.md
@@ -31,3 +31,19 @@ To link an already-built `leonida_xma2_decoder.lib` without invoking `cargo` dur
31or Linux cross-builds whose distribution `rustc` omits the `x86_64-pc-windows-msvc` standard library), pass 31or Linux cross-builds whose distribution `rustc` omits the `x86_64-pc-windows-msvc` standard library), pass
32`-DLEONIDA_XMA2_DECODER_LIB=<path>`. A value that does not name an existing file fails configure instead of falling 32`-DLEONIDA_XMA2_DECODER_LIB=<path>`. A value that does not name an existing file fails configure instead of falling
33back silently to muted XMA voices. 33back silently to muted XMA voices.
34
35Build that library yourself, from this checkout's `runtime/xma_decoder`, so that it matches the C ABI the runtime is
36compiled against. Configure checks only that the file exists, not which source, version or target it was built from,
37so don't use a library from another checkout, another project or a download:
38
39```sh
40rustup target add x86_64-pc-windows-msvc
41cargo build --manifest-path runtime/xma_decoder/Cargo.toml --release --locked --target x86_64-pc-windows-msvc
42```
43
44The library is then `runtime/xma_decoder/target/x86_64-pc-windows-msvc/release/leonida_xma2_decoder.lib`. Building a
45static library for that target needs only the Rust target, not the MSVC linker, so this also works on Linux.
46
47With the option set, CMake no longer builds the decoder: after a change under `runtime/xma_decoder/`, run the command
48again before building the runtime. A relative path given with `-D` on the command line is made absolute against the
49directory CMake runs in, so passing an absolute path avoids surprises.