Skip to content

brookmd 0.22.2 — final perf pass + brookmd-react-native 0.1.0

Choose a tag to compare

@siinghd siinghd released this 21 Jul 13:47

brookmd 0.22.2

A final performance pass over the Rust core before the platform rollout: profiling found two hot spots shared by every streaming document shape, and fixing them makes streaming 7–24% faster across all benchmarked shapes — byte-identical output, native and WASM builds alike.

  • the scanner's newline search (line_end), the hottest primitive in the engine (re-run by every block probe on every line), now scans 8 bytes per step (SWAR) instead of one;
  • the inline renderer copies runs of plain text with a single push_str instead of per-byte dispatch + escape calls.

Verified byte-identical by the full battery: CommonMark + GFM spec goldens, wire-envelope goldens, chunk-independence property tests, and the streaming-parity fuzzer. Ships as brookmd@0.22.2 on npm and brookmd-core 0.22.1 on crates.io.

This release window also includes brookmd-react-native@0.1.0 — the first npm publish of the React Native package, gated on the app-level end-to-end CI run (a real RN 0.86 release build streaming the wire goldens through the native parser on an Android emulator and an iOS simulator, byte-asserted). See 0.22.1's notes in the changelog for the Metro/Hermes compatibility fixes that e2e gate surfaced.

Prebuilt native artifacts (experimental)

CI-built binaries for the native bindings, rebuilt from the optimized core — the Swift/Kotlin/C-ABI/Flutter bindings are not yet on package registries. All emit the same versioned wire (WIRE.md v1.1.0), pinned by per-language golden tests.

Asset Contents SHA-256
brook_md_ffi.xcframework.zip Swift/uniffi XCFramework: iOS device + simulator + macOS (arm64 + x86_64) aaf78778121b901cbdb17567640237e2f722ab7adb1cf9fffc126b0a7e58cb45
brookmd-ffi-android-jniLibs.zip Android libbrook_md_ffi.so — arm64-v8a, armeabi-v7a, x86_64 (16 KB page aligned) 7264daa80bf2fd973e9862bf8ad58f0efbab61ad6a8372a532565b4ee1706f9a
brookmd-ffi-rn-ios.xcframework.zip React Native iOS XCFramework (device + fat simulator) eb3ec7d8aa8581c249ffeb1e693bd71c2701732439dc73e7fe9c24719dd8af48
brookmd-cabi-android.zip C-ABI libbrook_md_cabi.so per ABI + brook_md.h 79f6cf4359e4abddf87f4edbad62e394587d7741a3815ab282ced436b0c2017d
brookmd-cabi-apple.zip C-ABI XCFramework + universal macOS dylib + brook_md.h fa9f29b23e63131ef828f4c3e1636ddd6da51c4ad5a454764ddcb98221a596dc

Swift Package Manager binaryTarget example:

.binaryTarget(
    name: "BrookMdRustFFI",
    url: "https://github.com/siinghd/brookmd/releases/download/v0.22.2/brook_md_ffi.xcframework.zip",
    checksum: "aaf78778121b901cbdb17567640237e2f722ab7adb1cf9fffc126b0a7e58cb45"
)