Native dataflash log core, phase 1: vendored Rust workspace and build plumbing - #34
Open
userepo wants to merge 2 commits into
Open
Native dataflash log core, phase 1: vendored Rust workspace and build plumbing#34userepo wants to merge 2 commits into
userepo wants to merge 2 commits into
Conversation
Vendors the dflog Rust workspace (dflog-core parser + dflog-ffi C ABI cdylib, crates 0.7.1) from the upstream fork, with the SITL corpus its golden characterization tests pin against. MissionPlanner.csproj builds the library when cargo is on the PATH - RID-mapped targets for all four release platforms, output under obj/ so the build-identity check stays clean - and injects it into output and publish payloads as Content. Without a Rust toolchain the build prints a notice and the app is unchanged; the managed parser remains the runtime fallback. No binaries are checked in and no project files are added; the porting audit gates pass unchanged. Third-party crate notice in LICENSES/.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@Rouniy, this is the first of 4 planned PRs porting the dflog native log parser into MissionPlanner10, as offered in #24.
Phase 1 vendors the parser source and wires it into the build; it deliberately changes no runtime behavior; nothing consumes the library yet.
The follow-up phases add the P/Invoke bindings and
DFLogBufferfast paths (phase 2), the log-viewer/FFT/expression consumers (phase 3), and CI coverage for all four RIDs (phase 4), each as its own reviewable PR stacked on this one.What's included
rust/workspace:dflog-core(parser, index, columnar access: written to be bug-for-bug compatible withDFLogBuffer/BinaryLog, including malformed-log handling) anddflog-ffi(dflog_fficdylib, C ABI v5, panic-safe boundary), vendored from userepo/MissionPlanner branchrust/dflog-coreat crate version 0.7.1 (releasedflog-v0.7.1). The CLI, Python bindings, and fuzz targets stay upstream; parser changes land there first and are re-vendored.rust/testdata/: four SITL-generated .bin logs (~5 MB total) that the golden characterization tests pin exact values against. These are test fixtures, not build artifacts.MissionPlanner.csproj: aBuildDflogNativetarget (beforePrepareForBuild, on theFetchMacSimpleBlepattern) that builds the cdylib from source, whencargois on the PATH, RID-mapped--targettriples for win-x64 / linux-x64 / osx-x64 / osx-arm64, host-native build when no RID is set. Output goes underobj/dflog/andrust/target/is gitignored, so neither MSBuild nor manual cargo runs can dirty the build-identity check. The built library is injected asContentbeforeAssignTargetPaths, so it flows into output, publish, and every package payload.LICENSES/dflog-NOTICE.txt: third-party notice (memmap2 and the Rust standard library, Apache-2.0).What happens without cargo
The build prints a single notice and produces today's app unchanged — no failure, no missing-file surprises later. The managed parser remains the runtime path either way until phase 2 lands, and stays the permanent fallback after it.
Verification
cargo test(24 + 2),cargo fmt --check, andcargo clippy --workspace --all-targetsare clean in the vendored tree.check-project-artifacts.sh,check-binary-artifacts.sh, andcheck-native-surface.shall pass unchanged; no prebuilt binaries are checked in and no new project files exist.win-x64self-contained publish carriesdflog_ffi.dll(191 KB;strip = truerelease profile for the lintian gate).