Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c4bbaf314 | |||
| 99ad2ab107 | |||
| 8e225a5872 | |||
| 87bb008aa1 | |||
| b06ce2678a | |||
| 5b7523265c |
+6
-2
@@ -11,10 +11,13 @@ bindings/c/include/wickra.h text eol=lf
|
||||
*.cs text eol=lf
|
||||
|
||||
# Go sources (including the generated binding) are pinned to LF so gofmt's CI
|
||||
# check never trips on a CRLF checkout on Windows.
|
||||
# check never trips on a CRLF checkout on Windows. The vendored C ABI header is
|
||||
# a committed copy of bindings/c/include/wickra.h (the parent dir is outside the
|
||||
# Go module), pinned to LF so the drift check never trips on CRLF.
|
||||
*.go text eol=lf
|
||||
go.mod text eol=lf
|
||||
go.sum text eol=lf
|
||||
bindings/go/include/wickra.h text eol=lf
|
||||
|
||||
# Java sources (including the generated binding) are pinned to LF so the
|
||||
# committed files stay stable regardless of the committer's autocrlf setting.
|
||||
@@ -23,8 +26,9 @@ go.sum text eol=lf
|
||||
# R binding: `R CMD check` requires LF in sources, Makevars and shell scripts.
|
||||
*.R text eol=lf
|
||||
*.Rd text eol=lf
|
||||
bindings/r/configure text eol=lf
|
||||
bindings/r/configure.win text eol=lf
|
||||
bindings/r/src/Makevars text eol=lf
|
||||
bindings/r/src/Makevars.in text eol=lf
|
||||
bindings/r/src/Makevars.win text eol=lf
|
||||
bindings/r/src/wickra.c text eol=lf
|
||||
|
||||
|
||||
+41
-17
@@ -778,15 +778,36 @@ jobs:
|
||||
- name: Build the C ABI library
|
||||
run: cargo build -p wickra-c --release
|
||||
|
||||
- name: Vendored header in sync with the C ABI
|
||||
shell: bash
|
||||
# bindings/go/include/wickra.h is a committed copy of the cbindgen header
|
||||
# (the parent ../c/include is outside the Go module, so it must be
|
||||
# vendored). Fail if it drifts from the source of truth.
|
||||
run: |
|
||||
if ! diff -u bindings/c/include/wickra.h bindings/go/include/wickra.h; then
|
||||
echo "::error::bindings/go/include/wickra.h is stale — copy bindings/c/include/wickra.h over it"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Stage the native library
|
||||
shell: bash
|
||||
# Stage into lib/<goos>_<goarch>/ to match the per-platform cgo LDFLAGS.
|
||||
# CI builds the host target, so RUNNER_OS/ARCH give the right directory
|
||||
# (note macos-latest is arm64).
|
||||
run: |
|
||||
mkdir -p bindings/go/lib
|
||||
case "$RUNNER_OS" in
|
||||
Linux) cp target/release/libwickra.so bindings/go/lib/ ;;
|
||||
macOS) cp target/release/libwickra.dylib bindings/go/lib/ ;;
|
||||
Windows) cp target/release/wickra.dll bindings/go/lib/ ;;
|
||||
case "$RUNNER_ARCH" in
|
||||
X64) arch=amd64 ;;
|
||||
ARM64) arch=arm64 ;;
|
||||
*) echo "::error::unsupported RUNNER_ARCH '$RUNNER_ARCH'"; exit 1 ;;
|
||||
esac
|
||||
case "$RUNNER_OS" in
|
||||
Linux) dir="linux_$arch"; lib=target/release/libwickra.so ;;
|
||||
macOS) dir="darwin_$arch"; lib=target/release/libwickra.dylib ;;
|
||||
Windows) dir="windows_$arch"; lib=target/release/wickra.dll ;;
|
||||
esac
|
||||
mkdir -p "bindings/go/lib/$dir"
|
||||
cp "$lib" "bindings/go/lib/$dir/"
|
||||
echo "WICKRA_GO_LIBDIR=$PWD/bindings/go/lib/$dir" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Go info
|
||||
run: go version
|
||||
@@ -801,9 +822,11 @@ jobs:
|
||||
|
||||
- name: Vet and test the Go binding
|
||||
shell: bash
|
||||
# On Windows there is no rpath; the loader resolves wickra.dll via PATH.
|
||||
# On Windows there is no rpath; the loader resolves wickra.dll via PATH
|
||||
# (WICKRA_GO_LIBDIR is the per-platform staged lib dir). Linux/macOS use
|
||||
# the rpath baked by the per-platform cgo LDFLAGS.
|
||||
run: |
|
||||
export PATH="$PWD/bindings/go/lib:$PATH"
|
||||
export PATH="$WICKRA_GO_LIBDIR:$PATH"
|
||||
cd bindings/go
|
||||
go vet ./...
|
||||
go test ./...
|
||||
@@ -811,7 +834,7 @@ jobs:
|
||||
- name: Build the Go examples
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH="$PWD/bindings/go/lib:$PATH"
|
||||
export PATH="$WICKRA_GO_LIBDIR:$PATH"
|
||||
cd examples/go
|
||||
go build ./...
|
||||
|
||||
@@ -819,7 +842,7 @@ jobs:
|
||||
- name: Run the offline Go examples
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH="$PWD/bindings/go/lib:$PATH"
|
||||
export PATH="$WICKRA_GO_LIBDIR:$PATH"
|
||||
cd examples/go
|
||||
for d in streaming backtest multi_timeframe parallel_assets \
|
||||
strategy_rsi_mean_reversion strategy_macd_adx strategy_bollinger_squeeze; do
|
||||
@@ -868,23 +891,24 @@ jobs:
|
||||
|
||||
- name: Install and test the R binding
|
||||
shell: bash
|
||||
# github.workspace is a backslash path on Windows; configure.win (sh) and
|
||||
# mingw need forward slashes. On Linux/macOS the rpath points at
|
||||
# WICKRA_LIB_DIR; export the loader path too as a belt-and-suspenders.
|
||||
# github.workspace is a backslash path on Windows; configure(.win) (sh) and
|
||||
# mingw need forward slashes. WICKRA_*_DIR makes configure use the locally
|
||||
# built C ABI (dev override) instead of downloading the release asset, so
|
||||
# CI is version-independent. Deliberately do NOT set LD_LIBRARY_PATH /
|
||||
# DYLD_LIBRARY_PATH: the lib is bundled into the package and must resolve
|
||||
# via the rpath ($ORIGIN / @loader_path) baked by configure — that is the
|
||||
# self-contained install path real users (and r-universe) get.
|
||||
run: |
|
||||
export WICKRA_INCLUDE_DIR="${WICKRA_INCLUDE_DIR//\\//}"
|
||||
export WICKRA_LIB_DIR="${WICKRA_LIB_DIR//\\//}"
|
||||
export LD_LIBRARY_PATH="$WICKRA_LIB_DIR:$LD_LIBRARY_PATH"
|
||||
export DYLD_LIBRARY_PATH="$WICKRA_LIB_DIR:$DYLD_LIBRARY_PATH"
|
||||
R CMD INSTALL bindings/r
|
||||
Rscript -e 'library(testthat); library(wickra); test_dir("bindings/r/tests/testthat", stop_on_failure = TRUE)'
|
||||
|
||||
- name: Run the offline R examples
|
||||
shell: bash
|
||||
# No loader-path exports: the installed package is self-contained (bundled
|
||||
# lib + rpath), so the examples exercise exactly what end users run.
|
||||
run: |
|
||||
export WICKRA_LIB_DIR="${WICKRA_LIB_DIR//\\//}"
|
||||
export LD_LIBRARY_PATH="$WICKRA_LIB_DIR:$LD_LIBRARY_PATH"
|
||||
export DYLD_LIBRARY_PATH="$WICKRA_LIB_DIR:$DYLD_LIBRARY_PATH"
|
||||
cd examples/r
|
||||
for f in streaming backtest multi_timeframe parallel_assets \
|
||||
strategy_rsi_mean_reversion strategy_macd_adx strategy_bollinger_squeeze; do
|
||||
|
||||
@@ -775,6 +775,97 @@ jobs:
|
||||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||
run: mvn -B -f bindings/java -Prelease deploy -DskipTests
|
||||
|
||||
# Mirror the in-repo Go module (bindings/go) to the standalone wickra-go
|
||||
# repository so `go get github.com/wickra-lib/wickra-go` builds with no extra
|
||||
# steps. The in-repo module keeps the prebuilt libraries git-ignored; the
|
||||
# mirror commits them per platform under lib/<goos>_<goarch>/ alongside the
|
||||
# vendored header. Independent of the GitHub-release job so a Go hiccup never
|
||||
# blocks the C/C++ asset release. The push uses a fine-grained PAT
|
||||
# (WICKRA_GO_MIRROR_TOKEN, contents:write on wickra-go); the mirror is a
|
||||
# derived artifact, so its bot commit is intentionally unsigned.
|
||||
go-mirror:
|
||||
name: Mirror the Go module to wickra-go
|
||||
needs: c-abi-build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Download the C ABI native libraries
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
pattern: c-abi-*
|
||||
path: c-abi-artifacts
|
||||
|
||||
- name: Assemble the wickra-go module tree
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
out=wickra-go-module
|
||||
mkdir -p "$out/include" "$out/lib"
|
||||
# Single-package Go source + vendored C ABI header.
|
||||
cp bindings/go/*.go "$out/"
|
||||
cp bindings/go/include/wickra.h "$out/include/"
|
||||
cp bindings/go/README.md "$out/"
|
||||
# Ship the dual license so pkg.go.dev detects a redistributable license.
|
||||
cp LICENSE-MIT LICENSE-APACHE "$out/"
|
||||
# Standalone module path (the in-repo go.mod points at the subdir).
|
||||
printf 'module github.com/wickra-lib/wickra-go\n\ngo 1.23\n' > "$out/go.mod"
|
||||
# Point install instructions at the standalone module path.
|
||||
sed -i 's#github.com/wickra-lib/wickra/bindings/go#github.com/wickra-lib/wickra-go#g' \
|
||||
"$out/README.md" "$out"/*.go
|
||||
# Stage each prebuilt library under lib/<goos>_<goarch>/ (committed in
|
||||
# the mirror, unlike the in-repo lib/.gitignore). "<dir> <libfile>".
|
||||
declare -A GO=(
|
||||
[x86_64-unknown-linux-gnu]="linux_amd64 libwickra.so"
|
||||
[aarch64-unknown-linux-gnu]="linux_arm64 libwickra.so"
|
||||
[x86_64-apple-darwin]="darwin_amd64 libwickra.dylib"
|
||||
[aarch64-apple-darwin]="darwin_arm64 libwickra.dylib"
|
||||
[x86_64-pc-windows-msvc]="windows_amd64 wickra.dll"
|
||||
[aarch64-pc-windows-msvc]="windows_arm64 wickra.dll"
|
||||
)
|
||||
for target in "${!GO[@]}"; do
|
||||
read -r dir libfile <<< "${GO[$target]}"
|
||||
archive=$(find c-abi-artifacts -name "wickra-c-$target.tar.gz" | head -1)
|
||||
if [ -z "$archive" ]; then
|
||||
echo "::error::missing native artifact for $target"; exit 1
|
||||
fi
|
||||
tmp=$(mktemp -d); tar -xzf "$archive" -C "$tmp"
|
||||
src=$(find "$tmp" -name "$libfile" | head -1)
|
||||
if [ -z "$src" ]; then
|
||||
echo "::error::missing $libfile for $target"; exit 1
|
||||
fi
|
||||
mkdir -p "$out/lib/$dir"; cp "$src" "$out/lib/$dir/"
|
||||
done
|
||||
echo "assembled module:"; find "$out" -type f | sort
|
||||
|
||||
- name: Push to wickra-go and tag the release
|
||||
shell: bash
|
||||
env:
|
||||
MIRROR_TOKEN: ${{ secrets.WICKRA_GO_MIRROR_TOKEN }}
|
||||
run: |
|
||||
set -e
|
||||
version="${GITHUB_REF_NAME#v}"
|
||||
remote="https://x-access-token:${MIRROR_TOKEN}@github.com/wickra-lib/wickra-go.git"
|
||||
git clone -q "$remote" mirror-repo
|
||||
cd mirror-repo
|
||||
git config user.name "wickra-bot"
|
||||
git config user.email "support@wickra.org"
|
||||
git symbolic-ref HEAD refs/heads/main
|
||||
# Replace all tracked content with the freshly assembled tree.
|
||||
find . -mindepth 1 -maxdepth 1 -not -name .git -exec rm -rf {} +
|
||||
cp -r ../wickra-go-module/. .
|
||||
git add -A
|
||||
if git diff --cached --quiet; then
|
||||
echo "wickra-go already up to date; tagging only"
|
||||
else
|
||||
git -c commit.gpgsign=false commit -q -m "Release v$version"
|
||||
fi
|
||||
git push origin HEAD:refs/heads/main
|
||||
git tag "v$version"
|
||||
git push origin "v$version"
|
||||
|
||||
github-release:
|
||||
name: Attach assets to the draft GitHub Release
|
||||
needs: [cargo-publish, python-publish, node-publish, wasm-publish, c-abi-build]
|
||||
|
||||
+27
-1
@@ -5,6 +5,30 @@ All notable changes to Wickra are documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.8.1] - 2026-06-10
|
||||
### Fixed
|
||||
- **`wickra-go` license** — the release-time Go module mirror now ships the dual
|
||||
`LICENSE-MIT` and `LICENSE-APACHE` files, so pkg.go.dev detects a
|
||||
redistributable license for `github.com/wickra-lib/wickra-go`. The previous
|
||||
mirror shipped no license file.
|
||||
|
||||
## [0.8.0] - 2026-06-09
|
||||
### Added
|
||||
- **Standalone `wickra-go` module** — the Go binding is now mirrored to a
|
||||
dedicated `github.com/wickra-lib/wickra-go` repository on every release, with
|
||||
the prebuilt C ABI libraries committed per platform under
|
||||
`lib/<goos>_<goarch>/` and the C ABI header vendored alongside the source, so
|
||||
`go get github.com/wickra-lib/wickra-go` builds with no extra steps. The
|
||||
in-repo `bindings/go` module is unchanged for repo-clone workflows.
|
||||
|
||||
### Changed
|
||||
- **Go binding (`bindings/go`) is self-contained** — the C ABI header is now
|
||||
vendored inside the module (`bindings/go/include/wickra.h`) instead of being
|
||||
referenced from the parent `bindings/c` directory, and the cgo link flags
|
||||
resolve the prebuilt library per `GOOS`/`GOARCH` under `lib/<goos>_<goarch>/`.
|
||||
This removes the dependency on a full repository checkout for building the
|
||||
module.
|
||||
|
||||
## [0.7.9] - 2026-06-09
|
||||
### Added
|
||||
- **Java binding (`bindings/java`)** — a Java binding reaching the C ABI hub
|
||||
@@ -1461,7 +1485,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
optional Binance live feed.
|
||||
- Bindings for Python, Node.js, and WebAssembly.
|
||||
|
||||
[Unreleased]: https://github.com/wickra-lib/wickra/compare/v0.7.9...HEAD
|
||||
[Unreleased]: https://github.com/wickra-lib/wickra/compare/v0.8.1...HEAD
|
||||
[0.8.1]: https://github.com/wickra-lib/wickra/compare/v0.8.0...v0.8.1
|
||||
[0.8.0]: https://github.com/wickra-lib/wickra/compare/v0.7.9...v0.8.0
|
||||
[0.7.9]: https://github.com/wickra-lib/wickra/compare/v0.7.8...v0.7.9
|
||||
[0.7.8]: https://github.com/wickra-lib/wickra/compare/v0.7.7...v0.7.8
|
||||
[0.7.7]: https://github.com/wickra-lib/wickra/compare/v0.7.6...v0.7.7
|
||||
|
||||
Generated
+9
-9
@@ -1944,7 +1944,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wickra"
|
||||
version = "0.7.9"
|
||||
version = "0.8.1"
|
||||
dependencies = [
|
||||
"approx",
|
||||
"criterion",
|
||||
@@ -1955,7 +1955,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wickra-bench"
|
||||
version = "0.7.9"
|
||||
version = "0.8.1"
|
||||
dependencies = [
|
||||
"criterion",
|
||||
"kand",
|
||||
@@ -1967,14 +1967,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wickra-c"
|
||||
version = "0.7.9"
|
||||
version = "0.8.1"
|
||||
dependencies = [
|
||||
"wickra-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wickra-core"
|
||||
version = "0.7.9"
|
||||
version = "0.8.1"
|
||||
dependencies = [
|
||||
"approx",
|
||||
"proptest",
|
||||
@@ -1984,7 +1984,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wickra-data"
|
||||
version = "0.7.9"
|
||||
version = "0.8.1"
|
||||
dependencies = [
|
||||
"approx",
|
||||
"csv",
|
||||
@@ -2001,7 +2001,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wickra-examples"
|
||||
version = "0.7.9"
|
||||
version = "0.8.1"
|
||||
dependencies = [
|
||||
"serde_json",
|
||||
"tokio",
|
||||
@@ -2011,7 +2011,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wickra-node"
|
||||
version = "0.7.9"
|
||||
version = "0.8.1"
|
||||
dependencies = [
|
||||
"napi",
|
||||
"napi-build",
|
||||
@@ -2021,7 +2021,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wickra-python"
|
||||
version = "0.7.9"
|
||||
version = "0.8.1"
|
||||
dependencies = [
|
||||
"numpy",
|
||||
"pyo3",
|
||||
@@ -2030,7 +2030,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wickra-wasm"
|
||||
version = "0.7.9"
|
||||
version = "0.8.1"
|
||||
dependencies = [
|
||||
"console_error_panic_hook",
|
||||
"js-sys",
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ members = [
|
||||
exclude = ["fuzz"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.7.9"
|
||||
version = "0.8.1"
|
||||
authors = ["kingchenc <support@wickra.org>"]
|
||||
edition = "2021"
|
||||
rust-version = "1.86"
|
||||
@@ -26,7 +26,7 @@ keywords = ["finance", "trading", "indicators", "technical-analysis", "ta"]
|
||||
categories = ["finance", "mathematics", "science"]
|
||||
|
||||
[workspace.dependencies]
|
||||
wickra-core = { path = "crates/wickra-core", version = "0.7.9" }
|
||||
wickra-core = { path = "crates/wickra-core", version = "0.8.1" }
|
||||
|
||||
thiserror = "2"
|
||||
rayon = "1.10"
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
[](https://pypi.org/project/wickra/)
|
||||
[](https://www.npmjs.com/package/wickra)
|
||||
[](https://www.nuget.org/packages/Wickra)
|
||||
[](https://central.sonatype.com/artifact/org.wickra/wickra)
|
||||
[](https://pkg.go.dev/github.com/wickra-lib/wickra-go)
|
||||
[](https://wickra-lib.r-universe.dev)
|
||||
[](#license)
|
||||
[](https://scorecard.dev/viewer/?uri=github.com/wickra-lib/wickra)
|
||||
[](https://www.bestpractices.dev/projects/13094)
|
||||
@@ -52,6 +55,7 @@ Full documentation lives at **[docs.wickra.org](https://docs.wickra.org)**:
|
||||
[C](https://docs.wickra.org/Quickstart-C),
|
||||
[C#](https://docs.wickra.org/Quickstart-CSharp),
|
||||
[Go](https://docs.wickra.org/Quickstart-Go),
|
||||
[Java](https://docs.wickra.org/Quickstart-Java),
|
||||
[R](https://docs.wickra.org/Quickstart-R).
|
||||
- **Indicators** — a per-indicator deep dive (formula, parameters, warmup) for
|
||||
every one of the 514 indicators; start at the
|
||||
@@ -102,8 +106,7 @@ Every other library forces one of those compromises. Wickra doesn't:
|
||||
|
||||
| Library | Install | Streaming | Languages | Indicators | Active |
|
||||
|------------------|-------------|-------------|-----------------------------|-----------:|--------|
|
||||
| **★ Wickra**| **clean** | **yes, O(1)** | **Rust · Python · Node · WASM** | **514** | **yes** |
|
||||
| | | | **C · C# · Go · Java · R** | | |
|
||||
| **★ Wickra**| **clean** | **yes, O(1)** | **Rust · Python · Node · WASM · C · C# · Go · Java · R** | **514** | **yes** |
|
||||
| kand | clean | yes | Python · WASM · Rust | ~60 | yes |
|
||||
| ta-rs | clean | yes | Rust only | ~30 | stale |
|
||||
| yata | clean | partial | Rust only | ~35 | yes |
|
||||
|
||||
+24
-10
@@ -16,24 +16,38 @@ cgo and exposes all 514 streaming-first indicators as idiomatic types.
|
||||
|
||||
## Install
|
||||
|
||||
Use the published **`wickra-go`** module, which bundles the prebuilt C ABI
|
||||
library for every platform, so `go get` + `go build` works with no extra steps
|
||||
(a C compiler is still required, as the binding uses cgo):
|
||||
|
||||
```bash
|
||||
go get github.com/wickra-lib/wickra/bindings/go
|
||||
go get github.com/wickra-lib/wickra-go
|
||||
```
|
||||
|
||||
The binding uses cgo, so a C compiler is required, and it links against the
|
||||
prebuilt Wickra C ABI library. Build that library from the workspace and stage
|
||||
it under this package's `lib/` directory:
|
||||
```go
|
||||
import wickra "github.com/wickra-lib/wickra-go"
|
||||
```
|
||||
|
||||
`wickra-go` is generated from this directory by the release pipeline: it mirrors
|
||||
the Go sources, the vendored C ABI header (`include/wickra.h`) and the prebuilt
|
||||
libraries under `lib/<goos>_<goarch>/`. On Linux/macOS the library path is baked
|
||||
in via rpath; on Windows the DLL must be discoverable at run time (next to the
|
||||
executable or on `PATH`).
|
||||
|
||||
### Building from this repository (contributors)
|
||||
|
||||
This `bindings/go` directory is the development source. To build it directly,
|
||||
compile the C ABI and stage the library into the per-platform directory cgo
|
||||
links against:
|
||||
|
||||
```bash
|
||||
cargo build -p wickra-c --release
|
||||
cp target/release/libwickra.so bindings/go/lib/ # Linux
|
||||
cp target/release/libwickra.dylib bindings/go/lib/ # macOS
|
||||
cp target/release/wickra.dll bindings/go/lib/ # Windows (also on PATH at run time)
|
||||
mkdir -p bindings/go/lib/linux_amd64 # match your GOOS_GOARCH
|
||||
cp target/release/libwickra.so bindings/go/lib/linux_amd64/ # Linux
|
||||
cp target/release/libwickra.dylib bindings/go/lib/darwin_arm64/ # macOS (arm64)
|
||||
cp target/release/wickra.dll bindings/go/lib/windows_amd64/ # Windows
|
||||
```
|
||||
|
||||
On Linux and macOS the library path is baked in via rpath; on Windows the DLL
|
||||
must be discoverable at run time (next to the executable or on `PATH`).
|
||||
|
||||
## Quick start
|
||||
|
||||
```go
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+12
-7
@@ -4,16 +4,21 @@
|
||||
// Each indicator is an opaque-handle type with a New<Indicator> constructor and
|
||||
// Update/Batch/Reset/Close methods. Handles are freed by Close and, as a
|
||||
// backstop, by a finalizer; call Close explicitly to release native memory
|
||||
// promptly. The binding links against the prebuilt Wickra C ABI library
|
||||
// (libwickra.so/.dylib or wickra.dll) staged under ./lib — see the package
|
||||
// README for how to provision it.
|
||||
// promptly. The binding links against the prebuilt Wickra C ABI library, staged
|
||||
// per platform under ./lib/<goos>_<goarch>/, with the C ABI header vendored
|
||||
// under ./include. For distribution the libraries are committed alongside the
|
||||
// source in the wickra-go module, so `go get` + `go build` works with no extra
|
||||
// steps — see the package README.
|
||||
package wickra
|
||||
|
||||
/*
|
||||
#cgo CFLAGS: -I${SRCDIR}/../c/include
|
||||
#cgo linux LDFLAGS: -L${SRCDIR}/lib -lwickra -Wl,-rpath,${SRCDIR}/lib
|
||||
#cgo darwin LDFLAGS: -L${SRCDIR}/lib -lwickra -Wl,-rpath,${SRCDIR}/lib
|
||||
#cgo windows LDFLAGS: -L${SRCDIR}/lib -l:wickra.dll
|
||||
#cgo CFLAGS: -I${SRCDIR}/include
|
||||
#cgo linux,amd64 LDFLAGS: -L${SRCDIR}/lib/linux_amd64 -lwickra -Wl,-rpath,${SRCDIR}/lib/linux_amd64
|
||||
#cgo linux,arm64 LDFLAGS: -L${SRCDIR}/lib/linux_arm64 -lwickra -Wl,-rpath,${SRCDIR}/lib/linux_arm64
|
||||
#cgo darwin,amd64 LDFLAGS: -L${SRCDIR}/lib/darwin_amd64 -lwickra -Wl,-rpath,${SRCDIR}/lib/darwin_amd64
|
||||
#cgo darwin,arm64 LDFLAGS: -L${SRCDIR}/lib/darwin_arm64 -lwickra -Wl,-rpath,${SRCDIR}/lib/darwin_arm64
|
||||
#cgo windows,amd64 LDFLAGS: -L${SRCDIR}/lib/windows_amd64 -l:wickra.dll
|
||||
#cgo windows,arm64 LDFLAGS: -L${SRCDIR}/lib/windows_arm64 -l:wickra.dll
|
||||
#include "wickra.h"
|
||||
*/
|
||||
import "C"
|
||||
|
||||
@@ -30,14 +30,14 @@ Maven:
|
||||
<dependency>
|
||||
<groupId>org.wickra</groupId>
|
||||
<artifactId>wickra</artifactId>
|
||||
<version>0.7.9</version>
|
||||
<version>0.8.1</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
Gradle:
|
||||
|
||||
```kotlin
|
||||
implementation("org.wickra:wickra:0.7.9")
|
||||
implementation("org.wickra:wickra:0.8.1")
|
||||
```
|
||||
|
||||
The native library ships prebuilt per platform (Linux, macOS, Windows — x64 and
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>org.wickra</groupId>
|
||||
<artifactId>wickra</artifactId>
|
||||
<version>0.7.9</version>
|
||||
<version>0.8.1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Wickra</name>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wickra-darwin-arm64",
|
||||
"version": "0.7.9",
|
||||
"version": "0.8.1",
|
||||
"description": "Native binding for wickra (macOS Apple Silicon). Installed automatically as an optional dependency of wickra on matching platforms.",
|
||||
"main": "wickra.darwin-arm64.node",
|
||||
"files": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wickra-darwin-x64",
|
||||
"version": "0.7.9",
|
||||
"version": "0.8.1",
|
||||
"description": "Native binding for wickra (macOS Intel). Installed automatically as an optional dependency of wickra on matching platforms.",
|
||||
"main": "wickra.darwin-x64.node",
|
||||
"files": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wickra-linux-arm64-gnu",
|
||||
"version": "0.7.9",
|
||||
"version": "0.8.1",
|
||||
"description": "Native binding for wickra (linux arm64 GNU). Installed automatically as an optional dependency of wickra on matching platforms.",
|
||||
"main": "wickra.linux-arm64-gnu.node",
|
||||
"files": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wickra-linux-x64-gnu",
|
||||
"version": "0.7.9",
|
||||
"version": "0.8.1",
|
||||
"description": "Native binding for wickra (linux x64 GNU). Installed automatically as an optional dependency of wickra on matching platforms.",
|
||||
"main": "wickra.linux-x64-gnu.node",
|
||||
"files": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wickra-win32-arm64-msvc",
|
||||
"version": "0.7.9",
|
||||
"version": "0.8.1",
|
||||
"description": "Native binding for wickra (Windows arm64 MSVC). Installed automatically as an optional dependency of wickra on matching platforms.",
|
||||
"main": "wickra.win32-arm64-msvc.node",
|
||||
"files": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wickra-win32-x64-msvc",
|
||||
"version": "0.7.9",
|
||||
"version": "0.8.1",
|
||||
"description": "Native binding for wickra (Windows x64 MSVC). Installed automatically as an optional dependency of wickra on matching platforms.",
|
||||
"main": "wickra.win32-x64-msvc.node",
|
||||
"files": [
|
||||
|
||||
Generated
+20
-20
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "wickra",
|
||||
"version": "0.7.9",
|
||||
"version": "0.8.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "wickra",
|
||||
"version": "0.7.9",
|
||||
"version": "0.8.1",
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@napi-rs/cli": "^2.18.0"
|
||||
@@ -15,12 +15,12 @@
|
||||
"node": ">= 18"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"wickra-darwin-arm64": "0.7.9",
|
||||
"wickra-darwin-x64": "0.7.9",
|
||||
"wickra-linux-arm64-gnu": "0.7.9",
|
||||
"wickra-linux-x64-gnu": "0.7.9",
|
||||
"wickra-win32-arm64-msvc": "0.7.9",
|
||||
"wickra-win32-x64-msvc": "0.7.9"
|
||||
"wickra-darwin-arm64": "0.8.1",
|
||||
"wickra-darwin-x64": "0.8.1",
|
||||
"wickra-linux-arm64-gnu": "0.8.1",
|
||||
"wickra-linux-x64-gnu": "0.8.1",
|
||||
"wickra-win32-arm64-msvc": "0.8.1",
|
||||
"wickra-win32-x64-msvc": "0.8.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/cli": {
|
||||
@@ -41,8 +41,8 @@
|
||||
}
|
||||
},
|
||||
"node_modules/wickra-darwin-arm64": {
|
||||
"version": "0.7.9",
|
||||
"resolved": "https://registry.npmjs.org/wickra-darwin-arm64/-/wickra-darwin-arm64-0.7.9.tgz",
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/wickra-darwin-arm64/-/wickra-darwin-arm64-0.8.1.tgz",
|
||||
"integrity": "sha512-4eZiBR/yGUdr4nzhEUFy2i69XgNx64iI2ax/LPamsThgylC0KpHOZKK19QzJ2d9KbK4C8nMjME5FLuR+4GNEwQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
@@ -57,8 +57,8 @@
|
||||
}
|
||||
},
|
||||
"node_modules/wickra-darwin-x64": {
|
||||
"version": "0.7.9",
|
||||
"resolved": "https://registry.npmjs.org/wickra-darwin-x64/-/wickra-darwin-x64-0.7.9.tgz",
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/wickra-darwin-x64/-/wickra-darwin-x64-0.8.1.tgz",
|
||||
"integrity": "sha512-6hf8zI3QPjTFp4zCpmgUwDvNtu6jHqNUHKD5e55POo0CgA52HkpyxSPtVm8TGTIZDI7kPjlbOdBM8CJ76mmXwA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
@@ -73,8 +73,8 @@
|
||||
}
|
||||
},
|
||||
"node_modules/wickra-linux-arm64-gnu": {
|
||||
"version": "0.7.9",
|
||||
"resolved": "https://registry.npmjs.org/wickra-linux-arm64-gnu/-/wickra-linux-arm64-gnu-0.7.9.tgz",
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/wickra-linux-arm64-gnu/-/wickra-linux-arm64-gnu-0.8.1.tgz",
|
||||
"integrity": "sha512-kSe6y0xBMSiqdPLXNjwop5WZdHtvdBNKSEBCwZ4hFq33p4apW25/wrlzv9/oDuyD4kuPabJEhCCnFOplh58CUg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
@@ -89,8 +89,8 @@
|
||||
}
|
||||
},
|
||||
"node_modules/wickra-linux-x64-gnu": {
|
||||
"version": "0.7.9",
|
||||
"resolved": "https://registry.npmjs.org/wickra-linux-x64-gnu/-/wickra-linux-x64-gnu-0.7.9.tgz",
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/wickra-linux-x64-gnu/-/wickra-linux-x64-gnu-0.8.1.tgz",
|
||||
"integrity": "sha512-tWBWS4qz7hxM4xnpFb59bhf6TaLwXq0Z3jEa/2l7r8PiHA94g8r8S53NRMiT+4yiL5hSWe/nUiC/YXdRrhEZ4g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
@@ -105,8 +105,8 @@
|
||||
}
|
||||
},
|
||||
"node_modules/wickra-win32-arm64-msvc": {
|
||||
"version": "0.7.9",
|
||||
"resolved": "https://registry.npmjs.org/wickra-win32-arm64-msvc/-/wickra-win32-arm64-msvc-0.7.9.tgz",
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/wickra-win32-arm64-msvc/-/wickra-win32-arm64-msvc-0.8.1.tgz",
|
||||
"integrity": "sha512-EXIckHxAtF75PUGDKRzXyqMe9ldP0JjSdu68WFN6iJfp+McYrGu6h40TEJlQ/oUEIoPqiZB/xhVyo/el5Lg7zw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
@@ -121,8 +121,8 @@
|
||||
}
|
||||
},
|
||||
"node_modules/wickra-win32-x64-msvc": {
|
||||
"version": "0.7.9",
|
||||
"resolved": "https://registry.npmjs.org/wickra-win32-x64-msvc/-/wickra-win32-x64-msvc-0.7.9.tgz",
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/wickra-win32-x64-msvc/-/wickra-win32-x64-msvc-0.8.1.tgz",
|
||||
"integrity": "sha512-Yfsqq1Xwp6hdxMyLze411vNdo7BDwI6+lPSe7A9XdqyPecNDbtKwYLpsal2r8EHbNzqM+R8XnuRtUaEQS5VlUQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wickra",
|
||||
"version": "0.7.9",
|
||||
"version": "0.8.1",
|
||||
"description": "Streaming-first technical indicators: incremental, fast, install-free. Node bindings powered by Rust.",
|
||||
"author": "kingchenc <support@wickra.org>",
|
||||
"main": "index.js",
|
||||
@@ -47,12 +47,12 @@
|
||||
"node": ">= 18"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"wickra-linux-x64-gnu": "0.7.9",
|
||||
"wickra-linux-arm64-gnu": "0.7.9",
|
||||
"wickra-darwin-x64": "0.7.9",
|
||||
"wickra-darwin-arm64": "0.7.9",
|
||||
"wickra-win32-x64-msvc": "0.7.9",
|
||||
"wickra-win32-arm64-msvc": "0.7.9"
|
||||
"wickra-linux-x64-gnu": "0.8.1",
|
||||
"wickra-linux-arm64-gnu": "0.8.1",
|
||||
"wickra-darwin-x64": "0.8.1",
|
||||
"wickra-darwin-arm64": "0.8.1",
|
||||
"wickra-win32-x64-msvc": "0.8.1",
|
||||
"wickra-win32-arm64-msvc": "0.8.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "napi build --platform --release",
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
||||
|
||||
[project]
|
||||
name = "wickra"
|
||||
version = "0.7.9"
|
||||
version = "0.8.1"
|
||||
description = "Streaming-first technical indicators: incremental, fast, install-free."
|
||||
readme = "README.md"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
@@ -5,4 +5,9 @@
|
||||
^src/wickra\.dll$
|
||||
^src/wickra\.so$
|
||||
^src/symbols\.rds$
|
||||
^src/wickra\.h$
|
||||
^src/libwickra\.(so|dylib)$
|
||||
^src/wickra-c\.tar\.gz$
|
||||
^src/wickra-c$
|
||||
^src/Makevars$
|
||||
^\.gitignore$
|
||||
|
||||
@@ -12,8 +12,10 @@ URL: https://github.com/wickra-lib/wickra, https://docs.wickra.org
|
||||
BugReports: https://github.com/wickra-lib/wickra/issues
|
||||
Encoding: UTF-8
|
||||
NeedsCompilation: yes
|
||||
SystemRequirements: the Wickra C ABI library (libwickra); set WICKRA_INCLUDE_DIR
|
||||
and WICKRA_LIB_DIR when installing from source.
|
||||
SystemRequirements: the Wickra C ABI shared library, downloaded automatically at
|
||||
install time from the matching GitHub release and bundled into the package.
|
||||
Set WICKRA_INCLUDE_DIR and WICKRA_LIB_DIR to build against a locally built C
|
||||
ABI instead (e.g. after `cargo build -p wickra-c --release`).
|
||||
Roxygen: list(markdown = TRUE)
|
||||
Suggests: testthat (>= 3.0.0)
|
||||
Config/testthat/edition: 3
|
||||
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
#!/bin/sh
|
||||
# Resolve the Wickra C ABI (header + shared library) for the Unix build.
|
||||
#
|
||||
# Self-contained by default: download the prebuilt wickra-c-<triple>.tar.gz
|
||||
# release asset that matches this package's version and stage the shared library
|
||||
# into src/ so the compiled wickra.so links against it and bundles it (via
|
||||
# install.libs.R), found post-install through an rpath ($ORIGIN on Linux,
|
||||
# @loader_path on macOS). Set WICKRA_INCLUDE_DIR + WICKRA_LIB_DIR to build
|
||||
# against a locally built C ABI instead (dev override; e.g.
|
||||
# `cargo build -p wickra-c --release`). Download/extract uses base R (always
|
||||
# present at build time), so there is no curl/wget system dependency.
|
||||
set -e
|
||||
|
||||
inc=""
|
||||
lib=""
|
||||
if [ -n "${WICKRA_INCLUDE_DIR}" ] && [ -n "${WICKRA_LIB_DIR}" ]; then
|
||||
echo "wickra: using C ABI from WICKRA_INCLUDE_DIR / WICKRA_LIB_DIR (dev override)"
|
||||
inc="${WICKRA_INCLUDE_DIR}"
|
||||
lib="${WICKRA_LIB_DIR}"
|
||||
else
|
||||
version=$(sed -n 's/^Version:[[:space:]]*//p' DESCRIPTION)
|
||||
os=$(uname -s)
|
||||
arch=$(uname -m)
|
||||
case "${os}" in
|
||||
Linux)
|
||||
case "${arch}" in
|
||||
x86_64) triple="x86_64-unknown-linux-gnu" ;;
|
||||
aarch64 | arm64) triple="aarch64-unknown-linux-gnu" ;;
|
||||
*) echo "wickra: unsupported Linux arch '${arch}' — set WICKRA_INCLUDE_DIR/WICKRA_LIB_DIR"; exit 1 ;;
|
||||
esac
|
||||
;;
|
||||
Darwin)
|
||||
case "${arch}" in
|
||||
x86_64) triple="x86_64-apple-darwin" ;;
|
||||
arm64 | aarch64) triple="aarch64-apple-darwin" ;;
|
||||
*) echo "wickra: unsupported macOS arch '${arch}' — set WICKRA_INCLUDE_DIR/WICKRA_LIB_DIR"; exit 1 ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "wickra: unsupported OS '${os}' — set WICKRA_INCLUDE_DIR/WICKRA_LIB_DIR"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
url="https://github.com/wickra-lib/wickra/releases/download/v${version}/wickra-c-${triple}.tar.gz"
|
||||
echo "wickra: downloading C ABI ${triple} for v${version}"
|
||||
"${R_HOME}/bin/Rscript" -e "download.file('${url}', 'src/wickra-c.tar.gz', mode = 'wb', quiet = TRUE)" \
|
||||
|| { echo "wickra: failed to download ${url}"; exit 1; }
|
||||
"${R_HOME}/bin/Rscript" -e "untar('src/wickra-c.tar.gz', exdir = 'src/wickra-c')"
|
||||
inc="src/wickra-c/wickra-c-${triple}/include"
|
||||
lib="src/wickra-c/wickra-c-${triple}/lib"
|
||||
fi
|
||||
|
||||
# Stage the header and the platform shared library into src/ so the package
|
||||
# object links with -L. -lwickra and install.libs.R bundles the lib.
|
||||
cp "${inc}/wickra.h" src/wickra.h
|
||||
staged=""
|
||||
for f in libwickra.so libwickra.dylib; do
|
||||
if [ -f "${lib}/${f}" ]; then
|
||||
cp "${lib}/${f}" "src/${f}"
|
||||
staged="${f}"
|
||||
fi
|
||||
done
|
||||
if [ -z "${staged}" ]; then
|
||||
echo "wickra: no libwickra.so/.dylib found under ${lib}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# rpath so the bundled lib is found next to wickra.so after install.
|
||||
case "$(uname -s)" in
|
||||
Darwin)
|
||||
rpath="-Wl,-rpath,@loader_path"
|
||||
# Normalise the dylib id to @rpath so @loader_path resolution applies.
|
||||
install_name_tool -id "@rpath/${staged}" "src/${staged}" 2>/dev/null || true
|
||||
;;
|
||||
*)
|
||||
rpath="-Wl,-rpath,'\$\$ORIGIN'"
|
||||
;;
|
||||
esac
|
||||
|
||||
sed "s|@WICKRA_RPATH@|${rpath}|" src/Makevars.in > src/Makevars
|
||||
echo "wickra: configured (bundled ${staged})"
|
||||
exit 0
|
||||
@@ -4,9 +4,35 @@
|
||||
# itself). Stage a renamed copy, wickra_abi.dll, into src/ and build a mingw
|
||||
# import library that references it by that name (objdump + dlltool, both shipped
|
||||
# with Rtools — no gendef/pexports needed). install.libs.R then bundles the DLL.
|
||||
#
|
||||
# Self-contained by default: download the prebuilt wickra-c-<triple>.tar.gz
|
||||
# release asset matching this package's version. Set WICKRA_INCLUDE_DIR +
|
||||
# WICKRA_LIB_DIR to build against a locally built C ABI instead (dev override).
|
||||
set -e
|
||||
: "${WICKRA_LIB_DIR:?set WICKRA_LIB_DIR to the directory containing wickra.dll}"
|
||||
cp "${WICKRA_LIB_DIR}/wickra.dll" src/wickra_abi.dll
|
||||
|
||||
if [ -n "${WICKRA_INCLUDE_DIR}" ] && [ -n "${WICKRA_LIB_DIR}" ]; then
|
||||
echo "wickra: using C ABI from WICKRA_INCLUDE_DIR / WICKRA_LIB_DIR (dev override)"
|
||||
inc="${WICKRA_INCLUDE_DIR}"
|
||||
lib="${WICKRA_LIB_DIR}"
|
||||
else
|
||||
version=$(sed -n 's/^Version:[[:space:]]*//p' DESCRIPTION)
|
||||
arch=$(uname -m)
|
||||
case "${arch}" in
|
||||
x86_64) triple="x86_64-pc-windows-msvc" ;;
|
||||
aarch64 | arm64) triple="aarch64-pc-windows-msvc" ;;
|
||||
*) echo "wickra: unsupported Windows arch '${arch}' — set WICKRA_INCLUDE_DIR/WICKRA_LIB_DIR"; exit 1 ;;
|
||||
esac
|
||||
url="https://github.com/wickra-lib/wickra/releases/download/v${version}/wickra-c-${triple}.tar.gz"
|
||||
echo "wickra: downloading C ABI ${triple} for v${version}"
|
||||
"${R_HOME}/bin/Rscript" -e "download.file('${url}', 'src/wickra-c.tar.gz', mode = 'wb', quiet = TRUE)" \
|
||||
|| { echo "wickra: failed to download ${url}"; exit 1; }
|
||||
"${R_HOME}/bin/Rscript" -e "untar('src/wickra-c.tar.gz', exdir = 'src/wickra-c')"
|
||||
inc="src/wickra-c/wickra-c-${triple}/include"
|
||||
lib="src/wickra-c/wickra-c-${triple}/lib"
|
||||
fi
|
||||
|
||||
cp "${inc}/wickra.h" src/wickra.h
|
||||
cp "${lib}/wickra.dll" src/wickra_abi.dll
|
||||
{
|
||||
echo 'LIBRARY wickra_abi.dll'
|
||||
echo 'EXPORTS'
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
# Build artifacts and the configure.win-generated C ABI import shims.
|
||||
# Build artifacts and the configure-staged C ABI header / library / downloads.
|
||||
*.o
|
||||
*.so
|
||||
*.dll
|
||||
*.dll.a
|
||||
*.dylib
|
||||
wickra.h
|
||||
wickra_abi.def
|
||||
symbols.rds
|
||||
wickra-c.tar.gz
|
||||
wickra-c/
|
||||
# configure generates Makevars from Makevars.in (Makevars.in + Makevars.win stay tracked).
|
||||
/Makevars
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# The Wickra C ABI header and library are not vendored; point the build at them
|
||||
# via WICKRA_INCLUDE_DIR (containing wickra.h) and WICKRA_LIB_DIR (containing
|
||||
# libwickra). Build the library first with: cargo build -p wickra-c --release.
|
||||
PKG_CPPFLAGS = -I$(WICKRA_INCLUDE_DIR)
|
||||
PKG_LIBS = -L$(WICKRA_LIB_DIR) -lwickra -Wl,-rpath,$(WICKRA_LIB_DIR)
|
||||
@@ -0,0 +1,6 @@
|
||||
# Generated into src/Makevars by ../configure (the @WICKRA_RPATH@ token is
|
||||
# substituted per-OS: $ORIGIN on Linux, @loader_path on macOS). The C ABI header
|
||||
# (wickra.h) and shared library (libwickra.so/.dylib) are staged into src/ by
|
||||
# configure, so the package object links against the bundled lib.
|
||||
PKG_CPPFLAGS = -I.
|
||||
PKG_LIBS = -L. -lwickra @WICKRA_RPATH@
|
||||
@@ -1,5 +1,5 @@
|
||||
# Link the import library built by configure.win (references wickra_abi.dll, not
|
||||
# the package's own wickra.dll). The C ABI header dir is passed via
|
||||
# WICKRA_INCLUDE_DIR at build time.
|
||||
PKG_CPPFLAGS = -I$(WICKRA_INCLUDE_DIR)
|
||||
# the package's own wickra.dll). The C ABI header (wickra.h) is staged into src/
|
||||
# by configure.win, so the include path is the source dir itself.
|
||||
PKG_CPPFLAGS = -I.
|
||||
PKG_LIBS = libwickra_abi.dll.a
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
# Install the compiled package shared object plus, on Windows, the bundled
|
||||
# wickra_abi.dll (matched by the *.dll glob) so the loader can resolve the import
|
||||
# from the package's own libs directory (see .onLoad, which puts it on PATH).
|
||||
files <- Sys.glob(paste0("*", SHLIB_EXT))
|
||||
# Install the compiled package shared object plus the bundled C ABI library so
|
||||
# the package is self-contained: on Windows the wickra_abi.dll (matched by the
|
||||
# *.dll glob, loaded via PATH in .onLoad); on Linux the libwickra.so (matched by
|
||||
# the *.so SHLIB_EXT glob); on macOS the libwickra.dylib (added explicitly, since
|
||||
# R package objects use the .so extension there too). The Unix rpath baked by
|
||||
# configure ($ORIGIN / @loader_path) resolves it from this libs directory.
|
||||
files <- unique(c(Sys.glob(paste0("*", SHLIB_EXT)), Sys.glob("libwickra.dylib")))
|
||||
dest <- file.path(R_PACKAGE_DIR, paste0("libs", R_ARCH))
|
||||
dir.create(dest, recursive = TRUE, showWarnings = FALSE)
|
||||
file.copy(files, dest, overwrite = TRUE)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>org.wickra.examples</groupId>
|
||||
<artifactId>wickra-examples</artifactId>
|
||||
<version>0.7.9</version>
|
||||
<version>0.8.1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Wickra Java examples</name>
|
||||
@@ -21,7 +21,7 @@
|
||||
<dependency>
|
||||
<groupId>org.wickra</groupId>
|
||||
<artifactId>wickra</artifactId>
|
||||
<version>0.7.9</version>
|
||||
<version>0.8.1</version>
|
||||
</dependency>
|
||||
<!-- Only the network examples (fetch_btcusdt) parse JSON. -->
|
||||
<dependency>
|
||||
|
||||
Generated
+7
-7
@@ -17,7 +17,7 @@
|
||||
},
|
||||
"../../bindings/node": {
|
||||
"name": "wickra",
|
||||
"version": "0.7.9",
|
||||
"version": "0.8.1",
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@napi-rs/cli": "^2.18.0"
|
||||
@@ -26,12 +26,12 @@
|
||||
"node": ">= 18"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"wickra-darwin-arm64": "0.7.9",
|
||||
"wickra-darwin-x64": "0.7.9",
|
||||
"wickra-linux-arm64-gnu": "0.7.9",
|
||||
"wickra-linux-x64-gnu": "0.7.9",
|
||||
"wickra-win32-arm64-msvc": "0.7.9",
|
||||
"wickra-win32-x64-msvc": "0.7.9"
|
||||
"wickra-darwin-arm64": "0.8.1",
|
||||
"wickra-darwin-x64": "0.8.1",
|
||||
"wickra-linux-arm64-gnu": "0.8.1",
|
||||
"wickra-linux-x64-gnu": "0.8.1",
|
||||
"wickra-win32-arm64-msvc": "0.8.1",
|
||||
"wickra-win32-x64-msvc": "0.8.1"
|
||||
}
|
||||
},
|
||||
"node_modules/wickra": {
|
||||
|
||||
Reference in New Issue
Block a user