mars 1.0.0-dev.2
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:
dlopenoflibmars.sofailed with anUnsatisfiedLinkErrorbecausemars_boost::thread_detail::enter_once_region/commit_once_regionwere never linked.coroutine/src/posix/stack_traits.cppcallsmars_boost::call_once, which resolves throughBOOST_THREAD_ONCE_ATOMIC(thread/detail/config.hpp), and those two functions are defined inboost/libs/thread/src/pthread/once_atomic.cpp— a file the upstreamboost/CMakeLists.txtdoes 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 bundlinglibc++_shared.sofor armeabi-v7a (the NDK sysroot path is named after the platform triplearm-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-includessrc/comm/projdef.hon Linux, which follows the upstream layout — a platform dispatcher that includessrc/comm/linux/projdef.h(<stdint.h>), while Windows keeps the vendoredmars/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 serialnmake;jomis therefore required onPATHfor Windows builds. - XLog API (
lib/src/xlog.dart):open/closelifecycle 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/decodeSyncon the calling thread, with isolate-basedflush/decodewrappers 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
decodeof.xlogfiles back to plaintext, with optional ECDH private key for encrypted segments.
- FFI bindings generated by
ffigenfrom thesrc/mars.hbridge; 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.