-
-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Rust wrapper #3181
base: main
Are you sure you want to change the base?
WIP: Rust wrapper #3181
Conversation
611176c
to
d2ef4df
Compare
Bloaty Results 🐋Compared to main
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-3181-compared-to-main.txtCompared to d387090 (legacy)
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-3181-compared-to-legacy.txt |
Benchmark Results ⚡
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/benchmark-results/pr-3181-compared-to-main.txt |
platform/rust/src/wrapper.cc
Outdated
return std::make_unique<TileServerOptions>(); | ||
} | ||
std::unique_ptr<TileServerOptions> TileServerOptions_mapbox() { | ||
return std::make_unique<TileServerOptions>(TileServerOptions::MapLibreConfiguration()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are pending deprecation and removal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now these are good for testing, but I agree that we should remove these
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
BUG: the optional<str> access returns junk
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Bloaty Results (iOS) 🐋Compared to main
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results-ios/pr-3181-compared-to-main.txt |
TODO/Goals
&CStr
andCString
where it is not performance critical.Result<String>
for proper error reporting.Implementation ideas
Current thinking is to get
cmake
to produce a static library. All steps must be initiated by theplatform/rust-cxx/build.rs
:#[cxx::bridge] mod ffi { ... }
inplatform/rust-cxx/src/main.rs
cmake
crate executes cmake with special flags to pick up that header file, plus any other CC and H files in the rust-cxx dirs, plus the rest of the core and produces static libget_version
or some other basic thing