-
Notifications
You must be signed in to change notification settings - Fork 104
MINIFICPP-2740 Rust bindings based on stable C API #2186
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
Open
martinzink
wants to merge
21
commits into
apache:main
Choose a base branch
from
martinzink:minifi_rust
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
35e78e3
MINIFICPP-2740 Rust bindings based on stable C API
martinzink 512b5ec
rebase changes
martinzink 187e07c
cargo fmt
martinzink ffc3b4a
cargo behave fix
martinzink 67fdae7
small improvements
martinzink 8da953e
cargo fmt
martinzink 4024b26
update docs
9e306aa
fix clippy
123aaee
claude code review
martinzink 3f63290
arm clippy fixes
martinzink f58cc91
add Send for CffiInputStream/CffiOutputStream
martinzink 840db45
clippy fixes
martinzink ba6ad68
ci clippy changes
martinzink 6b3e659
rebase fixes
martinzink f33babc
update manifest
martinzink b0f7d6b
c23 update
martinzink ad0bec5
cargo fmt
martinzink ebcbd63
update manifest
martinzink 0dddb32
support c2x
martinzink e8a2505
tag docker image without explicit version
martinzink 7b2807b
cargo_check -> cargo_fmt_check
martinzink File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
665 changes: 654 additions & 11 deletions
665
.github/references/ubuntu_22_04_clang_arm_manifest.json
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -849,3 +849,5 @@ if (MINIFI_ADVANCED_CODE_COVERAGE) | |
| endif() | ||
|
|
||
| add_subdirectory(packaging) | ||
|
|
||
| add_subdirectory(minifi_rust) | ||
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| [target.aarch64-unknown-linux-musl] | ||
| rustflags = ["-C", "target-feature=-crt-static"] | ||
|
|
||
| [target.x86_64-unknown-linux-musl] | ||
| rustflags = ["-C", "target-feature=-crt-static"] | ||
|
|
||
| [target.aarch64-apple-darwin] | ||
| rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"] | ||
|
|
||
| [target.x86_64-apple-darwin] | ||
| rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"] | ||
|
|
||
| [alias] | ||
| behave = ["run", "--release", "--bin", "minifi_rs_behave"] | ||
| behave-alpine = ["run", "--release", "--bin", "minifi_rs_behave", "--", "--alpine"] | ||
| behave-debian = ["run", "--release", "--bin", "minifi_rs_behave", "--", "--debian"] | ||
|
|
||
| [env] | ||
| MINIFI_SDK_PATH="../" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| .git | ||
| .vscode | ||
| .gitmodules | ||
| .idea | ||
| output | ||
| features | ||
| target/debug | ||
| target/release/build | ||
| target/release/deps | ||
| target/release/.fingerprint | ||
| target/release/examples | ||
| target/release/incremental |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| .idea | ||
| output | ||
| venv | ||
| .venv | ||
| target | ||
| .DS_Store | ||
| Cargo.lock |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| # | ||
|
|
||
| if (NOT MINIFI_RUST) | ||
| return() | ||
| endif() | ||
|
|
||
| include(FetchContent) | ||
|
|
||
| # Corrosion is a tool for integrating Rust into an existing CMake project | ||
| FetchContent_Declare(Corrosion | ||
| URL https://github.com/corrosion-rs/corrosion/archive/refs/tags/v0.6.1.tar.gz | ||
| URL_HASH SHA256=e9e95b1ee2bad52681f347993fb1a5af5cce458c5ce8a2636c9e476e4babf8e3 | ||
| SYSTEM) | ||
|
|
||
| FetchContent_MakeAvailable(Corrosion) | ||
|
|
||
| set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") | ||
|
|
||
| corrosion_import_crate(MANIFEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Cargo.toml) | ||
|
|
||
| if (NOT ENABLE_TEST_PROCESSORS) | ||
| set_target_properties(cargo-build_minifi_rs_playground PROPERTIES EXCLUDE_FROM_ALL TRUE) | ||
| endif() | ||
|
|
||
| include(CTest) | ||
|
|
||
| add_test( | ||
| NAME cargo_tests | ||
| COMMAND cargo test | ||
| WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
| ) |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| [workspace] | ||
| resolver = "3" | ||
| members = ["minifi_native_sys", "minifi_native", "minifi_native_macros", "minifi_rs_behave", "extensions/*"] | ||
|
|
||
| [profile.release] | ||
| panic = "abort" | ||
|
|
||
| [profile.dev] | ||
| panic = "abort" |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.