Skip to main content

mars 1.0.0-dev.2 copy "mars: ^1.0.0-dev.2" to clipboard
mars: ^1.0.0-dev.2 copied to clipboard

Tencent/mars for Dart, the cross-platform component library developed by WeChat, built from vendored source via native assets build hooks.

1.0.0-dev.2 #

  • Fixed Android release builds crashing at startup: dlopen of libmars.so failed with an UnsatisfiedLinkError because mars_boost::thread_detail::enter_once_region / commit_once_region were never linked. coroutine/src/posix/stack_traits.cpp calls mars_boost::call_once, which resolves through BOOST_THREAD_ONCE_ATOMIC (thread/detail/config.hpp), and those two functions are defined in boost/libs/thread/src/pthread/once_atomic.cpp — a file the upstream boost/CMakeLists.txt does not compile (its plain archive linking never pulls the referencing object into the final library). The build hook now compiles it on Android, because our whole-archive link semantics require every referenced symbol to resolve.
  • Requires native_toolchain_x ^1.0.0-dev.2, which fixes bundling libc++_shared.so for armeabi-v7a (the NDK sysroot path is named after the platform triple arm-linux-androideabi, not the clang target triple).

1.0.0-dev.1 #

  • Linux builds compile again: several vendored headers declare fixed-width integer types without including <stdint.h> themselves, which libstdc++ does not pull in transitively (Apple libc++ and Android bionic do). The build hook now force-includes src/comm/projdef.h on Linux, which follows the upstream layout — a platform dispatcher that includes src/comm/linux/projdef.h (<stdint.h>), while Windows keeps the vendored mars/comm/projdef.h.
  • Requires native_toolchain_x ^1.0.0-dev.1, which no longer reports hook-generated headers as dependencies, so the build hook cache is reused across builds instead of rebuilding OpenSSL and zstd every time.

1.0.0-dev.0 #

  • Initial development prerelease of the Mars Dart bindings.
  • Vendored Tencent/mars release/2024-t3.1 (a8c6c7d3) is compiled through Dart native assets build hooks (hook/build.dart / hook/link.dart) into a single dynamic library per platform — Android, iOS, macOS, Windows, Linux.
  • Third-party dependencies are built from official source tarballs: OpenSSL 3.5.9 (latest LTS, upgraded from upstream 1.1.1l) and zstd 1.5.7 (upgraded from upstream 1.4.4).
  • OpenSSL is built in parallel on Windows with jom /J <cores> instead of serial nmake; jom is therefore required on PATH for Windows builds.
  • XLog API (lib/src/xlog.dart):
    • open / close lifecycle with async or sync appender mode.
    • Level-filtered logging helpers (verbose … fatal) with tags and automatic file/line/caller capture from Dart stack traces.
    • Blocking flushSync / decodeSync on the calling thread, with isolate-based flush / decode wrappers that do not block the caller.
    • Compression (zlib / zstd, level 1–9), ECDH public-key log encryption, rotation by file size and alive duration, and console mirroring.
    • Offline decode of .xlog files back to plaintext, with optional ECDH private key for encrypted segments.
  • FFI bindings generated by ffigen from the src/mars.h bridge; the bridge is the single entry point between Dart and the native library.
  • Note: this is a prerelease — the API surface may change in breaking ways before 1.0.0.
0
likes
150
points
84
downloads

Documentation

API reference

Publisher

verified publisherinvictus-dart.dev

Weekly Downloads

Tencent/mars for Dart, the cross-platform component library developed by WeChat, built from vendored source via native assets build hooks.

Topics

#mars

License

MIT (license)

Dependencies

code_assets, ffi, file, hooks, intl, logging, meta, native_toolchain_x, process, record_use, stack_trace

More

Packages that depend on mars