dart_bclibc 0.1.0 copy "dart_bclibc: ^0.1.0" to clipboard
dart_bclibc: ^0.1.0 copied to clipboard

Dart FFI bindings for the bclibc ballistics engine. Provides a thin, zero-copy Dart wrapper around libbclibc_ffi with full trajectory integration, zero-finding, and apex/max-range solvers.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased #

0.1.0 - 2026-07-03 #

First stable release. No functional changes since 0.1.0-beta.5 — the API, build system, and platform support are unchanged; this release marks the package as stable for pub.dev.

0.1.0-beta.5 - 2026-07-02 #

Fixed #

  • linux/CMakeLists.txt: beta.4 used install(FILES "$<TARGET_LINKER_FILE:bclibc_ffi>"), which copies the .so namelink itself (not its target) in cmake < 3.21 — producing a broken symlink in the Flutter bundle (libbclibc_ffi.so → libbclibc_ffi.so.0) with no real library present, causing DynamicLibrary.open() to fail at runtime. Fixed by switching to install(TARGETS bclibc_ffi LIBRARY DESTINATION lib), which installs the real versioned file together with its soname and namelink symlinks into the same directory — matching the standard Linux shared library layout and keeping the symlink chain valid.
  • windows/CMakeLists.txt: beta.4 added a redundant install(FILES bclibc_ffi.dll DESTINATION .) that doubled up with the standard PLUGIN_BUNDLED_LIBRARIES install loop already present in every Flutter app's windows/CMakeLists.txt. Removed the explicit install() call; the DLL is now delivered exclusively via dart_bclibc_bundled_libraries → PLUGIN_BUNDLED_LIBRARIES, matching the behaviour of the previous bclibc_ffi local package.

0.1.0-beta.4 - 2026-07-02 #

Changed #

  • linux/CMakeLists.txt and windows/CMakeLists.txt now register their own CMake install() rules for bclibc_ffi, so consuming Flutter apps no longer need to add manual install(TARGETS bclibc_ffi …) blocks to their platform CMakeLists.txt. On Windows, add_dependencies(flutter_assemble bclibc_ffi) is also registered automatically, preserving the correct build order in Visual Studio. Android is unaffected — the Gradle/AGP native build collects shared library targets from the CMake project without install().

0.1.0-beta.3 - 2026-07-01 #

Fixed #

  • bin/build_native.dart resolved its own package root via Platform.script, which points at a cached kernel snapshot in the caller's .dart_tool/pub/bin/ — not this file's real location in pub-cache — when invoked as dart run dart_bclibc:build_native from a consuming project (as opposed to running it directly from within this repo, which is how it was tested for 0.1.0-beta.2). Switched to Isolate.resolvePackageUri, which goes through the actual package_config.json resolution and works regardless of pub-cache vs. path dependency vs. snapshot caching.

0.1.0-beta.2 - 2026-07-01 #

Added #

  • bin/build_native.dartdart run dart_bclibc:build_native builds the standalone libbclibc_ffi shared library into build/bclibc/, for consumers running flutter test/dart test, which never trigger the platform build that bundles the library automatically

Changed #

  • Makefile's build target now delegates to bin/build_native.dart instead of duplicating the CMake invocation
  • CI (test-submodule, test-macos) builds the native library via dart run bin/build_native.dart instead of raw CMake commands; dropped the now-unused ninja-build system dependency from test-submodule

0.1.0-beta.1 - 2026-07-01 #

First public release as a standalone package.

Added #

  • BcLibC — main entry point; open with BcLibC.open()
  • BcLibC.integrateShot — full trajectory integration
  • BcLibC.integrateAtShot — trajectory integration to a specific intercept key
  • BcLibC.findZeroAngleShot — barrel elevation for a given zero distance
  • BcLibC.findApexShot — apex point of a ballistic arc
  • BcLibC.findMaxRangeShot — maximum range and angle
  • BcLibC.calculateEnergy, calculateOgw, getCorrection — utility functions
  • BcShot — user-facing shot descriptor in natural units; all physics conversion (atmosphere density, Coriolis trig, PCHIP drag curve, cant sin/cos) delegated to C++ via BCLIBCFFI_Shot::to_shot_props()
  • BcTrajectoryRequest, BcTrajectoryData, BcBaseTrajData, BcHitResult, BcInterception, BcMaxRangeResult — result types
  • BcException — structured error with per-error-code extras (requestedDistanceFt, zeroFindingError, etc.)
  • BcConfig — solver tuning parameters (step multiplier, accuracy, limits)
  • BcWind, BcDragPoint — wind and drag table entry value types
  • Unit system (lib/unit.dart): Distance, Velocity, Temperature, Pressure, Angular, Weight, Energy with in_() / toDouble() API
  • Smoke-test suite (test/ffi_test.dart, test/unit_test.dart)
  • Makefile with build, ffigen, test, clean targets
  • CI workflow (.github/workflows/ci.yml): analyze, submodule build, FetchContent build, macOS build, pub.dev dry-run jobs

Notes #

  • Platforms: Linux, Windows, Android (arm64-v8a, x86_64), iOS, macOS
  • Native library: libbclibc_ffi.so / bclibc_ffi.dll / libbclibc_ffi.dylib — compiled from bclibc/ (v1.1.4, LGPL-3.0)
  • CMake build strategy (Linux/Windows/Android):
    1. submodule present → add_subdirectory (pub.dev; run git submodule update --init before publishing)
    2. pre-installed library found → use it (Flatpak /app/lib)
    3. fallback → FetchContent from GitHub (git dep via dart pub get)
0
likes
130
points
32
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Dart FFI bindings for the bclibc ballistics engine. Provides a thin, zero-copy Dart wrapper around libbclibc_ffi with full trajectory integration, zero-finding, and apex/max-range solvers.

Repository (GitHub)
View/report issues

License

LGPL-3.0 (license)

Dependencies

ffi, flutter, plugin_platform_interface

More

Packages that depend on dart_bclibc

Packages that implement dart_bclibc