Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b31a9a3624 | ||
|
|
6433c9b3de | ||
|
|
447bbc8220 | ||
|
|
c9ef2fc037 | ||
|
|
49c2872ad4 | ||
|
|
0c4bbaf314 | ||
|
|
99ad2ab107 | ||
|
|
8e225a5872 | ||
|
|
87bb008aa1 | ||
|
|
b06ce2678a | ||
|
|
5b7523265c |
+6
-2
@@ -11,10 +11,13 @@ bindings/c/include/wickra.h text eol=lf
|
|||||||
*.cs text eol=lf
|
*.cs text eol=lf
|
||||||
|
|
||||||
# Go sources (including the generated binding) are pinned to LF so gofmt's CI
|
# 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 text eol=lf
|
||||||
go.mod text eol=lf
|
go.mod text eol=lf
|
||||||
go.sum 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
|
# Java sources (including the generated binding) are pinned to LF so the
|
||||||
# committed files stay stable regardless of the committer's autocrlf setting.
|
# 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 binding: `R CMD check` requires LF in sources, Makevars and shell scripts.
|
||||||
*.R text eol=lf
|
*.R text eol=lf
|
||||||
*.Rd text eol=lf
|
*.Rd text eol=lf
|
||||||
|
bindings/r/configure text eol=lf
|
||||||
bindings/r/configure.win 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/Makevars.win text eol=lf
|
||||||
bindings/r/src/wickra.c text eol=lf
|
bindings/r/src/wickra.c text eol=lf
|
||||||
|
|
||||||
|
|||||||
+41
-17
@@ -778,15 +778,36 @@ jobs:
|
|||||||
- name: Build the C ABI library
|
- name: Build the C ABI library
|
||||||
run: cargo build -p wickra-c --release
|
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
|
- name: Stage the native library
|
||||||
shell: bash
|
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: |
|
run: |
|
||||||
mkdir -p bindings/go/lib
|
case "$RUNNER_ARCH" in
|
||||||
case "$RUNNER_OS" in
|
X64) arch=amd64 ;;
|
||||||
Linux) cp target/release/libwickra.so bindings/go/lib/ ;;
|
ARM64) arch=arm64 ;;
|
||||||
macOS) cp target/release/libwickra.dylib bindings/go/lib/ ;;
|
*) echo "::error::unsupported RUNNER_ARCH '$RUNNER_ARCH'"; exit 1 ;;
|
||||||
Windows) cp target/release/wickra.dll bindings/go/lib/ ;;
|
|
||||||
esac
|
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
|
- name: Go info
|
||||||
run: go version
|
run: go version
|
||||||
@@ -801,9 +822,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Vet and test the Go binding
|
- name: Vet and test the Go binding
|
||||||
shell: bash
|
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: |
|
run: |
|
||||||
export PATH="$PWD/bindings/go/lib:$PATH"
|
export PATH="$WICKRA_GO_LIBDIR:$PATH"
|
||||||
cd bindings/go
|
cd bindings/go
|
||||||
go vet ./...
|
go vet ./...
|
||||||
go test ./...
|
go test ./...
|
||||||
@@ -811,7 +834,7 @@ jobs:
|
|||||||
- name: Build the Go examples
|
- name: Build the Go examples
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
export PATH="$PWD/bindings/go/lib:$PATH"
|
export PATH="$WICKRA_GO_LIBDIR:$PATH"
|
||||||
cd examples/go
|
cd examples/go
|
||||||
go build ./...
|
go build ./...
|
||||||
|
|
||||||
@@ -819,7 +842,7 @@ jobs:
|
|||||||
- name: Run the offline Go examples
|
- name: Run the offline Go examples
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
export PATH="$PWD/bindings/go/lib:$PATH"
|
export PATH="$WICKRA_GO_LIBDIR:$PATH"
|
||||||
cd examples/go
|
cd examples/go
|
||||||
for d in streaming backtest multi_timeframe parallel_assets \
|
for d in streaming backtest multi_timeframe parallel_assets \
|
||||||
strategy_rsi_mean_reversion strategy_macd_adx strategy_bollinger_squeeze; do
|
strategy_rsi_mean_reversion strategy_macd_adx strategy_bollinger_squeeze; do
|
||||||
@@ -868,23 +891,24 @@ jobs:
|
|||||||
|
|
||||||
- name: Install and test the R binding
|
- name: Install and test the R binding
|
||||||
shell: bash
|
shell: bash
|
||||||
# github.workspace is a backslash path on Windows; configure.win (sh) and
|
# github.workspace is a backslash path on Windows; configure(.win) (sh) and
|
||||||
# mingw need forward slashes. On Linux/macOS the rpath points at
|
# mingw need forward slashes. WICKRA_*_DIR makes configure use the locally
|
||||||
# WICKRA_LIB_DIR; export the loader path too as a belt-and-suspenders.
|
# 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: |
|
run: |
|
||||||
export WICKRA_INCLUDE_DIR="${WICKRA_INCLUDE_DIR//\\//}"
|
export WICKRA_INCLUDE_DIR="${WICKRA_INCLUDE_DIR//\\//}"
|
||||||
export WICKRA_LIB_DIR="${WICKRA_LIB_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
|
R CMD INSTALL bindings/r
|
||||||
Rscript -e 'library(testthat); library(wickra); test_dir("bindings/r/tests/testthat", stop_on_failure = TRUE)'
|
Rscript -e 'library(testthat); library(wickra); test_dir("bindings/r/tests/testthat", stop_on_failure = TRUE)'
|
||||||
|
|
||||||
- name: Run the offline R examples
|
- name: Run the offline R examples
|
||||||
shell: bash
|
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: |
|
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
|
cd examples/r
|
||||||
for f in streaming backtest multi_timeframe parallel_assets \
|
for f in streaming backtest multi_timeframe parallel_assets \
|
||||||
strategy_rsi_mean_reversion strategy_macd_adx strategy_bollinger_squeeze; do
|
strategy_rsi_mean_reversion strategy_macd_adx strategy_bollinger_squeeze; do
|
||||||
|
|||||||
@@ -775,6 +775,97 @@ jobs:
|
|||||||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
run: mvn -B -f bindings/java -Prelease deploy -DskipTests
|
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:
|
github-release:
|
||||||
name: Attach assets to the draft GitHub Release
|
name: Attach assets to the draft GitHub Release
|
||||||
needs: [cargo-publish, python-publish, node-publish, wasm-publish, c-abi-build]
|
needs: [cargo-publish, python-publish, node-publish, wasm-publish, c-abi-build]
|
||||||
|
|||||||
@@ -332,12 +332,14 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
cd docs-ver
|
cd docs-ver
|
||||||
# Published-versions table rows (crates.io / PyPI / npm): replace only the
|
# Published-versions table rows (all registries): replace only the
|
||||||
# version number, leaving the trailing padding + pipe intact. The '.' in
|
# version number, leaving the trailing padding + pipe intact. The
|
||||||
# the quickstart pattern matches the literal backtick around the version
|
# registry name is matched whether plain or wrapped in a markdown link
|
||||||
# without needing a backtick in this shell string. Historical "since
|
# (\[?...\]?). The '.' in the quickstart pattern matches the literal
|
||||||
# X.Y.Z" references contain no such anchor and are never matched.
|
# backtick around the version without needing a backtick in this shell
|
||||||
sed -i -E "s/^(\| (crates\.io|PyPI|npm) .*\| )[0-9]+\.[0-9]+\.[0-9]+/\1${version}/" overview.md
|
# string. Historical "since X.Y.Z" references contain no such anchor and
|
||||||
|
# are never matched.
|
||||||
|
sed -i -E "s/^(\| \[?(crates\.io|PyPI|npm|NuGet|Maven Central|Go|r-universe)\]?.*\| )[0-9]+\.[0-9]+\.[0-9]+/\1${version}/" overview.md
|
||||||
sed -i -E "s/(published crate is at version .)[0-9]+\.[0-9]+\.[0-9]+/\1${version}/" Quickstart-Rust.md
|
sed -i -E "s/(published crate is at version .)[0-9]+\.[0-9]+\.[0-9]+/\1${version}/" Quickstart-Rust.md
|
||||||
if git diff --quiet; then
|
if git diff --quiet; then
|
||||||
echo "Docs version already at ${version}."
|
echo "Docs version already at ${version}."
|
||||||
|
|||||||
+37
-1
@@ -5,6 +5,39 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [0.8.2] - 2026-06-10
|
||||||
|
### Fixed
|
||||||
|
- **R binding builds for WebAssembly** — `bindings/r/configure` now builds the
|
||||||
|
C ABI from source for the `wasm32-unknown-emscripten` target (r-universe /
|
||||||
|
webR) using the build image's cargo + emscripten, instead of failing with
|
||||||
|
"unsupported OS Emscripten". rayon is dropped on wasm via
|
||||||
|
`--no-default-features`; the indicators are pure computation, so the serial
|
||||||
|
path is functionally identical.
|
||||||
|
|
||||||
|
## [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
|
## [0.7.9] - 2026-06-09
|
||||||
### Added
|
### Added
|
||||||
- **Java binding (`bindings/java`)** — a Java binding reaching the C ABI hub
|
- **Java binding (`bindings/java`)** — a Java binding reaching the C ABI hub
|
||||||
@@ -1461,7 +1494,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
optional Binance live feed.
|
optional Binance live feed.
|
||||||
- Bindings for Python, Node.js, and WebAssembly.
|
- 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.2...HEAD
|
||||||
|
[0.8.2]: https://github.com/wickra-lib/wickra/compare/v0.8.1...v0.8.2
|
||||||
|
[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.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.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
|
[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]]
|
[[package]]
|
||||||
name = "wickra"
|
name = "wickra"
|
||||||
version = "0.7.9"
|
version = "0.8.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"approx",
|
"approx",
|
||||||
"criterion",
|
"criterion",
|
||||||
@@ -1955,7 +1955,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wickra-bench"
|
name = "wickra-bench"
|
||||||
version = "0.7.9"
|
version = "0.8.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"criterion",
|
"criterion",
|
||||||
"kand",
|
"kand",
|
||||||
@@ -1967,14 +1967,14 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wickra-c"
|
name = "wickra-c"
|
||||||
version = "0.7.9"
|
version = "0.8.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"wickra-core",
|
"wickra-core",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wickra-core"
|
name = "wickra-core"
|
||||||
version = "0.7.9"
|
version = "0.8.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"approx",
|
"approx",
|
||||||
"proptest",
|
"proptest",
|
||||||
@@ -1984,7 +1984,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wickra-data"
|
name = "wickra-data"
|
||||||
version = "0.7.9"
|
version = "0.8.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"approx",
|
"approx",
|
||||||
"csv",
|
"csv",
|
||||||
@@ -2001,7 +2001,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wickra-examples"
|
name = "wickra-examples"
|
||||||
version = "0.7.9"
|
version = "0.8.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"tokio",
|
"tokio",
|
||||||
@@ -2011,7 +2011,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wickra-node"
|
name = "wickra-node"
|
||||||
version = "0.7.9"
|
version = "0.8.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"napi",
|
"napi",
|
||||||
"napi-build",
|
"napi-build",
|
||||||
@@ -2021,7 +2021,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wickra-python"
|
name = "wickra-python"
|
||||||
version = "0.7.9"
|
version = "0.8.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"numpy",
|
"numpy",
|
||||||
"pyo3",
|
"pyo3",
|
||||||
@@ -2030,7 +2030,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wickra-wasm"
|
name = "wickra-wasm"
|
||||||
version = "0.7.9"
|
version = "0.8.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"console_error_panic_hook",
|
"console_error_panic_hook",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
|
|||||||
+2
-2
@@ -14,7 +14,7 @@ members = [
|
|||||||
exclude = ["fuzz"]
|
exclude = ["fuzz"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.7.9"
|
version = "0.8.2"
|
||||||
authors = ["kingchenc <support@wickra.org>"]
|
authors = ["kingchenc <support@wickra.org>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.86"
|
rust-version = "1.86"
|
||||||
@@ -26,7 +26,7 @@ keywords = ["finance", "trading", "indicators", "technical-analysis", "ta"]
|
|||||||
categories = ["finance", "mathematics", "science"]
|
categories = ["finance", "mathematics", "science"]
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
wickra-core = { path = "crates/wickra-core", version = "0.7.9" }
|
wickra-core = { path = "crates/wickra-core", version = "0.8.2" }
|
||||||
|
|
||||||
thiserror = "2"
|
thiserror = "2"
|
||||||
rayon = "1.10"
|
rayon = "1.10"
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
[](https://pypi.org/project/wickra/)
|
[](https://pypi.org/project/wickra/)
|
||||||
[](https://www.npmjs.com/package/wickra)
|
[](https://www.npmjs.com/package/wickra)
|
||||||
[](https://www.nuget.org/packages/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)
|
[](#license)
|
||||||
[](https://scorecard.dev/viewer/?uri=github.com/wickra-lib/wickra)
|
[](https://scorecard.dev/viewer/?uri=github.com/wickra-lib/wickra)
|
||||||
[](https://www.bestpractices.dev/projects/13094)
|
[](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-C),
|
||||||
[C#](https://docs.wickra.org/Quickstart-CSharp),
|
[C#](https://docs.wickra.org/Quickstart-CSharp),
|
||||||
[Go](https://docs.wickra.org/Quickstart-Go),
|
[Go](https://docs.wickra.org/Quickstart-Go),
|
||||||
|
[Java](https://docs.wickra.org/Quickstart-Java),
|
||||||
[R](https://docs.wickra.org/Quickstart-R).
|
[R](https://docs.wickra.org/Quickstart-R).
|
||||||
- **Indicators** — a per-indicator deep dive (formula, parameters, warmup) for
|
- **Indicators** — a per-indicator deep dive (formula, parameters, warmup) for
|
||||||
every one of the 514 indicators; start at the
|
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 |
|
| Library | Install | Streaming | Languages | Indicators | Active |
|
||||||
|------------------|-------------|-------------|-----------------------------|-----------:|--------|
|
|------------------|-------------|-------------|-----------------------------|-----------:|--------|
|
||||||
| **★ Wickra**| **clean** | **yes, O(1)** | **Rust · Python · Node · WASM** | **514** | **yes** |
|
| **★ Wickra**| **clean** | **yes, O(1)** | **Rust · Python · Node · WASM · C · C# · Go · Java · R** | **514** | **yes** |
|
||||||
| | | | **C · C# · Go · Java · R** | | |
|
|
||||||
| kand | clean | yes | Python · WASM · Rust | ~60 | yes |
|
| kand | clean | yes | Python · WASM · Rust | ~60 | yes |
|
||||||
| ta-rs | clean | yes | Rust only | ~30 | stale |
|
| ta-rs | clean | yes | Rust only | ~30 | stale |
|
||||||
| yata | clean | partial | Rust only | ~35 | yes |
|
| yata | clean | partial | Rust only | ~35 | yes |
|
||||||
|
|||||||
+14
-1
@@ -42,5 +42,18 @@ cast_sign_loss = "allow"
|
|||||||
similar_names = "allow"
|
similar_names = "allow"
|
||||||
float_cmp = "allow"
|
float_cmp = "allow"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
# `parallel` (rayon-backed batch in wickra-core) is on by default for native
|
||||||
|
# builds. The wasm32-unknown-emscripten target has no threads, so the R
|
||||||
|
# package's wasm build (r-universe / webR) compiles this crate with
|
||||||
|
# --no-default-features to drop rayon; wickra-core falls back to its serial
|
||||||
|
# batch path, which is cfg-gated behind the same feature.
|
||||||
|
default = ["parallel"]
|
||||||
|
parallel = ["wickra-core/parallel"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
wickra-core = { workspace = true }
|
# Direct path dep rather than `workspace = true`: a member-level
|
||||||
|
# `default-features = false` is ignored when inheriting a workspace dep that
|
||||||
|
# does not set it, which would leave rayon in the wasm build. wickra-c is
|
||||||
|
# `publish = false`, so no version pin is needed (and none to keep in sync).
|
||||||
|
wickra-core = { path = "../../crates/wickra-core", default-features = false }
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<!-- NuGet package metadata -->
|
<!-- NuGet package metadata -->
|
||||||
<PackageId>Wickra</PackageId>
|
<PackageId>Wickra</PackageId>
|
||||||
<Version>0.7.9</Version>
|
<Version>0.8.2</Version>
|
||||||
<Authors>kingchenc</Authors>
|
<Authors>kingchenc</Authors>
|
||||||
<Description>High-performance streaming technical-analysis indicators (514 indicators) for .NET, backed by the native Rust core via the Wickra C ABI.</Description>
|
<Description>High-performance streaming technical-analysis indicators (514 indicators) for .NET, backed by the native Rust core via the Wickra C ABI.</Description>
|
||||||
<PackageLicenseExpression>MIT OR Apache-2.0</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT OR Apache-2.0</PackageLicenseExpression>
|
||||||
|
|||||||
+25
-11
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[](https://github.com/wickra-lib/wickra/actions/workflows/ci.yml)
|
[](https://github.com/wickra-lib/wickra/actions/workflows/ci.yml)
|
||||||
[](https://codecov.io/gh/wickra-lib/wickra)
|
[](https://codecov.io/gh/wickra-lib/wickra)
|
||||||
[](https://pkg.go.dev/github.com/wickra-lib/wickra/bindings/go)
|
[](https://pkg.go.dev/github.com/wickra-lib/wickra/bindings/go)
|
||||||
[](https://github.com/wickra-lib/wickra#license)
|
[](https://github.com/wickra-lib/wickra#license)
|
||||||
|
|
||||||
**Streaming-first technical indicators for Go, over the Wickra C ABI hub via cgo.**
|
**Streaming-first technical indicators for Go, over the Wickra C ABI hub via cgo.**
|
||||||
@@ -16,24 +16,38 @@ cgo and exposes all 514 streaming-first indicators as idiomatic types.
|
|||||||
|
|
||||||
## Install
|
## 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
|
```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
|
```go
|
||||||
prebuilt Wickra C ABI library. Build that library from the workspace and stage
|
import wickra "github.com/wickra-lib/wickra-go"
|
||||||
it under this package's `lib/` directory:
|
```
|
||||||
|
|
||||||
|
`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
|
```bash
|
||||||
cargo build -p wickra-c --release
|
cargo build -p wickra-c --release
|
||||||
cp target/release/libwickra.so bindings/go/lib/ # Linux
|
mkdir -p bindings/go/lib/linux_amd64 # match your GOOS_GOARCH
|
||||||
cp target/release/libwickra.dylib bindings/go/lib/ # macOS
|
cp target/release/libwickra.so bindings/go/lib/linux_amd64/ # Linux
|
||||||
cp target/release/wickra.dll bindings/go/lib/ # Windows (also on PATH at run time)
|
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
|
## Quick start
|
||||||
|
|
||||||
```go
|
```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
|
// 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
|
// Update/Batch/Reset/Close methods. Handles are freed by Close and, as a
|
||||||
// backstop, by a finalizer; call Close explicitly to release native memory
|
// backstop, by a finalizer; call Close explicitly to release native memory
|
||||||
// promptly. The binding links against the prebuilt Wickra C ABI library
|
// promptly. The binding links against the prebuilt Wickra C ABI library, staged
|
||||||
// (libwickra.so/.dylib or wickra.dll) staged under ./lib — see the package
|
// per platform under ./lib/<goos>_<goarch>/, with the C ABI header vendored
|
||||||
// README for how to provision it.
|
// 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
|
package wickra
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#cgo CFLAGS: -I${SRCDIR}/../c/include
|
#cgo CFLAGS: -I${SRCDIR}/include
|
||||||
#cgo linux LDFLAGS: -L${SRCDIR}/lib -lwickra -Wl,-rpath,${SRCDIR}/lib
|
#cgo linux,amd64 LDFLAGS: -L${SRCDIR}/lib/linux_amd64 -lwickra -Wl,-rpath,${SRCDIR}/lib/linux_amd64
|
||||||
#cgo darwin LDFLAGS: -L${SRCDIR}/lib -lwickra -Wl,-rpath,${SRCDIR}/lib
|
#cgo linux,arm64 LDFLAGS: -L${SRCDIR}/lib/linux_arm64 -lwickra -Wl,-rpath,${SRCDIR}/lib/linux_arm64
|
||||||
#cgo windows LDFLAGS: -L${SRCDIR}/lib -l:wickra.dll
|
#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"
|
#include "wickra.h"
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|||||||
@@ -30,14 +30,14 @@ Maven:
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wickra</groupId>
|
<groupId>org.wickra</groupId>
|
||||||
<artifactId>wickra</artifactId>
|
<artifactId>wickra</artifactId>
|
||||||
<version>0.7.9</version>
|
<version>0.8.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
Gradle:
|
Gradle:
|
||||||
|
|
||||||
```kotlin
|
```kotlin
|
||||||
implementation("org.wickra:wickra:0.7.9")
|
implementation("org.wickra:wickra:0.8.2")
|
||||||
```
|
```
|
||||||
|
|
||||||
The native library ships prebuilt per platform (Linux, macOS, Windows — x64 and
|
The native library ships prebuilt per platform (Linux, macOS, Windows — x64 and
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>org.wickra</groupId>
|
<groupId>org.wickra</groupId>
|
||||||
<artifactId>wickra</artifactId>
|
<artifactId>wickra</artifactId>
|
||||||
<version>0.7.9</version>
|
<version>0.8.2</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>Wickra</name>
|
<name>Wickra</name>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wickra-darwin-arm64",
|
"name": "wickra-darwin-arm64",
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"description": "Native binding for wickra (macOS Apple Silicon). Installed automatically as an optional dependency of wickra on matching platforms.",
|
"description": "Native binding for wickra (macOS Apple Silicon). Installed automatically as an optional dependency of wickra on matching platforms.",
|
||||||
"main": "wickra.darwin-arm64.node",
|
"main": "wickra.darwin-arm64.node",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wickra-darwin-x64",
|
"name": "wickra-darwin-x64",
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"description": "Native binding for wickra (macOS Intel). Installed automatically as an optional dependency of wickra on matching platforms.",
|
"description": "Native binding for wickra (macOS Intel). Installed automatically as an optional dependency of wickra on matching platforms.",
|
||||||
"main": "wickra.darwin-x64.node",
|
"main": "wickra.darwin-x64.node",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wickra-linux-arm64-gnu",
|
"name": "wickra-linux-arm64-gnu",
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"description": "Native binding for wickra (linux arm64 GNU). Installed automatically as an optional dependency of wickra on matching platforms.",
|
"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",
|
"main": "wickra.linux-arm64-gnu.node",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wickra-linux-x64-gnu",
|
"name": "wickra-linux-x64-gnu",
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"description": "Native binding for wickra (linux x64 GNU). Installed automatically as an optional dependency of wickra on matching platforms.",
|
"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",
|
"main": "wickra.linux-x64-gnu.node",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wickra-win32-arm64-msvc",
|
"name": "wickra-win32-arm64-msvc",
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"description": "Native binding for wickra (Windows arm64 MSVC). Installed automatically as an optional dependency of wickra on matching platforms.",
|
"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",
|
"main": "wickra.win32-arm64-msvc.node",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wickra-win32-x64-msvc",
|
"name": "wickra-win32-x64-msvc",
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"description": "Native binding for wickra (Windows x64 MSVC). Installed automatically as an optional dependency of wickra on matching platforms.",
|
"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",
|
"main": "wickra.win32-x64-msvc.node",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
Generated
+20
-20
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "wickra",
|
"name": "wickra",
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "wickra",
|
"name": "wickra",
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@napi-rs/cli": "^2.18.0"
|
"@napi-rs/cli": "^2.18.0"
|
||||||
@@ -15,12 +15,12 @@
|
|||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"wickra-darwin-arm64": "0.7.9",
|
"wickra-darwin-arm64": "0.8.2",
|
||||||
"wickra-darwin-x64": "0.7.9",
|
"wickra-darwin-x64": "0.8.2",
|
||||||
"wickra-linux-arm64-gnu": "0.7.9",
|
"wickra-linux-arm64-gnu": "0.8.2",
|
||||||
"wickra-linux-x64-gnu": "0.7.9",
|
"wickra-linux-x64-gnu": "0.8.2",
|
||||||
"wickra-win32-arm64-msvc": "0.7.9",
|
"wickra-win32-arm64-msvc": "0.8.2",
|
||||||
"wickra-win32-x64-msvc": "0.7.9"
|
"wickra-win32-x64-msvc": "0.8.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@napi-rs/cli": {
|
"node_modules/@napi-rs/cli": {
|
||||||
@@ -41,8 +41,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/wickra-darwin-arm64": {
|
"node_modules/wickra-darwin-arm64": {
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"resolved": "https://registry.npmjs.org/wickra-darwin-arm64/-/wickra-darwin-arm64-0.7.9.tgz",
|
"resolved": "https://registry.npmjs.org/wickra-darwin-arm64/-/wickra-darwin-arm64-0.8.2.tgz",
|
||||||
"integrity": "sha512-4eZiBR/yGUdr4nzhEUFy2i69XgNx64iI2ax/LPamsThgylC0KpHOZKK19QzJ2d9KbK4C8nMjME5FLuR+4GNEwQ==",
|
"integrity": "sha512-4eZiBR/yGUdr4nzhEUFy2i69XgNx64iI2ax/LPamsThgylC0KpHOZKK19QzJ2d9KbK4C8nMjME5FLuR+4GNEwQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
@@ -57,8 +57,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/wickra-darwin-x64": {
|
"node_modules/wickra-darwin-x64": {
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"resolved": "https://registry.npmjs.org/wickra-darwin-x64/-/wickra-darwin-x64-0.7.9.tgz",
|
"resolved": "https://registry.npmjs.org/wickra-darwin-x64/-/wickra-darwin-x64-0.8.2.tgz",
|
||||||
"integrity": "sha512-6hf8zI3QPjTFp4zCpmgUwDvNtu6jHqNUHKD5e55POo0CgA52HkpyxSPtVm8TGTIZDI7kPjlbOdBM8CJ76mmXwA==",
|
"integrity": "sha512-6hf8zI3QPjTFp4zCpmgUwDvNtu6jHqNUHKD5e55POo0CgA52HkpyxSPtVm8TGTIZDI7kPjlbOdBM8CJ76mmXwA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
@@ -73,8 +73,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/wickra-linux-arm64-gnu": {
|
"node_modules/wickra-linux-arm64-gnu": {
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"resolved": "https://registry.npmjs.org/wickra-linux-arm64-gnu/-/wickra-linux-arm64-gnu-0.7.9.tgz",
|
"resolved": "https://registry.npmjs.org/wickra-linux-arm64-gnu/-/wickra-linux-arm64-gnu-0.8.2.tgz",
|
||||||
"integrity": "sha512-kSe6y0xBMSiqdPLXNjwop5WZdHtvdBNKSEBCwZ4hFq33p4apW25/wrlzv9/oDuyD4kuPabJEhCCnFOplh58CUg==",
|
"integrity": "sha512-kSe6y0xBMSiqdPLXNjwop5WZdHtvdBNKSEBCwZ4hFq33p4apW25/wrlzv9/oDuyD4kuPabJEhCCnFOplh58CUg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
@@ -89,8 +89,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/wickra-linux-x64-gnu": {
|
"node_modules/wickra-linux-x64-gnu": {
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"resolved": "https://registry.npmjs.org/wickra-linux-x64-gnu/-/wickra-linux-x64-gnu-0.7.9.tgz",
|
"resolved": "https://registry.npmjs.org/wickra-linux-x64-gnu/-/wickra-linux-x64-gnu-0.8.2.tgz",
|
||||||
"integrity": "sha512-tWBWS4qz7hxM4xnpFb59bhf6TaLwXq0Z3jEa/2l7r8PiHA94g8r8S53NRMiT+4yiL5hSWe/nUiC/YXdRrhEZ4g==",
|
"integrity": "sha512-tWBWS4qz7hxM4xnpFb59bhf6TaLwXq0Z3jEa/2l7r8PiHA94g8r8S53NRMiT+4yiL5hSWe/nUiC/YXdRrhEZ4g==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
@@ -105,8 +105,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/wickra-win32-arm64-msvc": {
|
"node_modules/wickra-win32-arm64-msvc": {
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"resolved": "https://registry.npmjs.org/wickra-win32-arm64-msvc/-/wickra-win32-arm64-msvc-0.7.9.tgz",
|
"resolved": "https://registry.npmjs.org/wickra-win32-arm64-msvc/-/wickra-win32-arm64-msvc-0.8.2.tgz",
|
||||||
"integrity": "sha512-EXIckHxAtF75PUGDKRzXyqMe9ldP0JjSdu68WFN6iJfp+McYrGu6h40TEJlQ/oUEIoPqiZB/xhVyo/el5Lg7zw==",
|
"integrity": "sha512-EXIckHxAtF75PUGDKRzXyqMe9ldP0JjSdu68WFN6iJfp+McYrGu6h40TEJlQ/oUEIoPqiZB/xhVyo/el5Lg7zw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
@@ -121,8 +121,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/wickra-win32-x64-msvc": {
|
"node_modules/wickra-win32-x64-msvc": {
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"resolved": "https://registry.npmjs.org/wickra-win32-x64-msvc/-/wickra-win32-x64-msvc-0.7.9.tgz",
|
"resolved": "https://registry.npmjs.org/wickra-win32-x64-msvc/-/wickra-win32-x64-msvc-0.8.2.tgz",
|
||||||
"integrity": "sha512-Yfsqq1Xwp6hdxMyLze411vNdo7BDwI6+lPSe7A9XdqyPecNDbtKwYLpsal2r8EHbNzqM+R8XnuRtUaEQS5VlUQ==",
|
"integrity": "sha512-Yfsqq1Xwp6hdxMyLze411vNdo7BDwI6+lPSe7A9XdqyPecNDbtKwYLpsal2r8EHbNzqM+R8XnuRtUaEQS5VlUQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wickra",
|
"name": "wickra",
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"description": "Streaming-first technical indicators: incremental, fast, install-free. Node bindings powered by Rust.",
|
"description": "Streaming-first technical indicators: incremental, fast, install-free. Node bindings powered by Rust.",
|
||||||
"author": "kingchenc <support@wickra.org>",
|
"author": "kingchenc <support@wickra.org>",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
@@ -47,12 +47,12 @@
|
|||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"wickra-linux-x64-gnu": "0.7.9",
|
"wickra-linux-x64-gnu": "0.8.2",
|
||||||
"wickra-linux-arm64-gnu": "0.7.9",
|
"wickra-linux-arm64-gnu": "0.8.2",
|
||||||
"wickra-darwin-x64": "0.7.9",
|
"wickra-darwin-x64": "0.8.2",
|
||||||
"wickra-darwin-arm64": "0.7.9",
|
"wickra-darwin-arm64": "0.8.2",
|
||||||
"wickra-win32-x64-msvc": "0.7.9",
|
"wickra-win32-x64-msvc": "0.8.2",
|
||||||
"wickra-win32-arm64-msvc": "0.7.9"
|
"wickra-win32-arm64-msvc": "0.8.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "napi build --platform --release",
|
"build": "napi build --platform --release",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "wickra"
|
name = "wickra"
|
||||||
version = "0.7.9"
|
version = "0.8.2"
|
||||||
description = "Streaming-first technical indicators: incremental, fast, install-free."
|
description = "Streaming-first technical indicators: incremental, fast, install-free."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
|
|||||||
@@ -5,4 +5,9 @@
|
|||||||
^src/wickra\.dll$
|
^src/wickra\.dll$
|
||||||
^src/wickra\.so$
|
^src/wickra\.so$
|
||||||
^src/symbols\.rds$
|
^src/symbols\.rds$
|
||||||
|
^src/wickra\.h$
|
||||||
|
^src/libwickra\.(so|dylib)$
|
||||||
|
^src/wickra-c\.tar\.gz$
|
||||||
|
^src/wickra-c$
|
||||||
|
^src/Makevars$
|
||||||
^\.gitignore$
|
^\.gitignore$
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Package: wickra
|
Package: wickra
|
||||||
Type: Package
|
Type: Package
|
||||||
Title: Streaming-First Technical Indicators
|
Title: Streaming-First Technical Indicators
|
||||||
Version: 0.7.9
|
Version: 0.8.2
|
||||||
Authors@R: person("Wickra contributors", role = c("aut", "cre"), email = "support@wickra.org")
|
Authors@R: person("Wickra contributors", role = c("aut", "cre"), email = "support@wickra.org")
|
||||||
Description: R bindings for the Wickra technical-analysis library over its C ABI
|
Description: R bindings for the Wickra technical-analysis library over its C ABI
|
||||||
hub. Exposes 514 indicators, each an O(1) streaming state machine shared with
|
hub. Exposes 514 indicators, each an O(1) streaming state machine shared with
|
||||||
@@ -12,8 +12,10 @@ URL: https://github.com/wickra-lib/wickra, https://docs.wickra.org
|
|||||||
BugReports: https://github.com/wickra-lib/wickra/issues
|
BugReports: https://github.com/wickra-lib/wickra/issues
|
||||||
Encoding: UTF-8
|
Encoding: UTF-8
|
||||||
NeedsCompilation: yes
|
NeedsCompilation: yes
|
||||||
SystemRequirements: the Wickra C ABI library (libwickra); set WICKRA_INCLUDE_DIR
|
SystemRequirements: the Wickra C ABI shared library, downloaded automatically at
|
||||||
and WICKRA_LIB_DIR when installing from source.
|
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)
|
Roxygen: list(markdown = TRUE)
|
||||||
Suggests: testthat (>= 3.0.0)
|
Suggests: testthat (>= 3.0.0)
|
||||||
Config/testthat/edition: 3
|
Config/testthat/edition: 3
|
||||||
|
|||||||
+112
@@ -0,0 +1,112 @@
|
|||||||
|
#!/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=""
|
||||||
|
|
||||||
|
# WebAssembly (r-universe / webR): there is no prebuilt wasm C ABI to download,
|
||||||
|
# but the build image ships cargo (/usr/local/cargo/bin) and emscripten
|
||||||
|
# (EMSDK on PATH), so build the C ABI staticlib from source for
|
||||||
|
# wasm32-unknown-emscripten right here. Building it in the same image with the
|
||||||
|
# same emscripten avoids any ABI/version mismatch a prebuilt lib would risk.
|
||||||
|
# rayon (threads) is dropped via --no-default-features; the indicators are pure
|
||||||
|
# computation, so the serial path is functionally identical.
|
||||||
|
if [ "$(uname -s)" = "Emscripten" ]; then
|
||||||
|
version=$(sed -n 's/^Version:[[:space:]]*//p' DESCRIPTION)
|
||||||
|
echo "wickra: building C ABI from source for wasm32-unknown-emscripten (v${version})"
|
||||||
|
build=$(mktemp -d)
|
||||||
|
url="https://github.com/wickra-lib/wickra/archive/refs/tags/v${version}.tar.gz"
|
||||||
|
"${R_HOME}/bin/Rscript" -e "download.file('${url}', '${build}/src.tar.gz', mode = 'wb', quiet = TRUE)" \
|
||||||
|
|| { echo "wickra: failed to download source ${url}"; exit 1; }
|
||||||
|
"${R_HOME}/bin/Rscript" -e "untar('${build}/src.tar.gz', exdir = '${build}')"
|
||||||
|
root="${build}/wickra-${version}"
|
||||||
|
rustup target add wasm32-unknown-emscripten 2>/dev/null || true
|
||||||
|
( cd "${root}" && cargo build -p wickra-c --release \
|
||||||
|
--target wasm32-unknown-emscripten --no-default-features ) \
|
||||||
|
|| { echo "wickra: cargo wasm build failed"; exit 1; }
|
||||||
|
cp "${root}/bindings/c/include/wickra.h" src/wickra.h
|
||||||
|
cp "${root}/target/wasm32-unknown-emscripten/release/libwickra.a" src/libwickra.a
|
||||||
|
rm -rf "${build}"
|
||||||
|
# The static archive is linked into the package object; no shared lib to
|
||||||
|
# bundle and no rpath needed.
|
||||||
|
sed "s|@WICKRA_RPATH@||" src/Makevars.in > src/Makevars
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
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
|
# 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
|
# 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.
|
# 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
|
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 'LIBRARY wickra_abi.dll'
|
||||||
echo 'EXPORTS'
|
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
|
*.o
|
||||||
*.so
|
*.so
|
||||||
*.dll
|
*.dll
|
||||||
*.dll.a
|
*.dll.a
|
||||||
|
*.dylib
|
||||||
|
wickra.h
|
||||||
wickra_abi.def
|
wickra_abi.def
|
||||||
symbols.rds
|
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
|
# 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
|
# the package's own wickra.dll). The C ABI header (wickra.h) is staged into src/
|
||||||
# WICKRA_INCLUDE_DIR at build time.
|
# by configure.win, so the include path is the source dir itself.
|
||||||
PKG_CPPFLAGS = -I$(WICKRA_INCLUDE_DIR)
|
PKG_CPPFLAGS = -I.
|
||||||
PKG_LIBS = libwickra_abi.dll.a
|
PKG_LIBS = libwickra_abi.dll.a
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
# Install the compiled package shared object plus, on Windows, the bundled
|
# Install the compiled package shared object plus the bundled C ABI library so
|
||||||
# wickra_abi.dll (matched by the *.dll glob) so the loader can resolve the import
|
# the package is self-contained: on Windows the wickra_abi.dll (matched by the
|
||||||
# from the package's own libs directory (see .onLoad, which puts it on PATH).
|
# *.dll glob, loaded via PATH in .onLoad); on Linux the libwickra.so (matched by
|
||||||
files <- Sys.glob(paste0("*", SHLIB_EXT))
|
# 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))
|
dest <- file.path(R_PACKAGE_DIR, paste0("libs", R_ARCH))
|
||||||
dir.create(dest, recursive = TRUE, showWarnings = FALSE)
|
dir.create(dest, recursive = TRUE, showWarnings = FALSE)
|
||||||
file.copy(files, dest, overwrite = TRUE)
|
file.copy(files, dest, overwrite = TRUE)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>org.wickra.examples</groupId>
|
<groupId>org.wickra.examples</groupId>
|
||||||
<artifactId>wickra-examples</artifactId>
|
<artifactId>wickra-examples</artifactId>
|
||||||
<version>0.7.9</version>
|
<version>0.8.2</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>Wickra Java examples</name>
|
<name>Wickra Java examples</name>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wickra</groupId>
|
<groupId>org.wickra</groupId>
|
||||||
<artifactId>wickra</artifactId>
|
<artifactId>wickra</artifactId>
|
||||||
<version>0.7.9</version>
|
<version>0.8.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Only the network examples (fetch_btcusdt) parse JSON. -->
|
<!-- Only the network examples (fetch_btcusdt) parse JSON. -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
Generated
+7
-7
@@ -17,7 +17,7 @@
|
|||||||
},
|
},
|
||||||
"../../bindings/node": {
|
"../../bindings/node": {
|
||||||
"name": "wickra",
|
"name": "wickra",
|
||||||
"version": "0.7.9",
|
"version": "0.8.2",
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@napi-rs/cli": "^2.18.0"
|
"@napi-rs/cli": "^2.18.0"
|
||||||
@@ -26,12 +26,12 @@
|
|||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"wickra-darwin-arm64": "0.7.9",
|
"wickra-darwin-arm64": "0.8.2",
|
||||||
"wickra-darwin-x64": "0.7.9",
|
"wickra-darwin-x64": "0.8.2",
|
||||||
"wickra-linux-arm64-gnu": "0.7.9",
|
"wickra-linux-arm64-gnu": "0.8.2",
|
||||||
"wickra-linux-x64-gnu": "0.7.9",
|
"wickra-linux-x64-gnu": "0.8.2",
|
||||||
"wickra-win32-arm64-msvc": "0.7.9",
|
"wickra-win32-arm64-msvc": "0.8.2",
|
||||||
"wickra-win32-x64-msvc": "0.7.9"
|
"wickra-win32-x64-msvc": "0.8.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/wickra": {
|
"node_modules/wickra": {
|
||||||
|
|||||||
Reference in New Issue
Block a user