-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Replace C FFI with rust-bindgen #315
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
0b0f47d
feat: Replace C FFI with rust-bindgen
samuelburnham 9c9f1fa
Use bindgen Rust functions directly
samuelburnham a39288c
Fmt & clippy
samuelburnham 5104c50
cargo fmt
samuelburnham 5581818
Test Rust error in CI
samuelburnham e5ce7cb
ci: Switch to setup-rust-toolchain action
samuelburnham aa2fcc7
Add API wrappers for c_void pointers
samuelburnham ad3a498
checkpoint
samuelburnham 19a2927
Finish porting c_void to typed `LeanObj` API
samuelburnham 24ad79a
Fmt
samuelburnham dc3789c
Use descriptive types and rename LeanObj->LeanObject
samuelburnham da99816
Move `src/lean/ffi` to `src/ffi`
samuelburnham 89559f7
Clippy
samuelburnham b39bdfc
ci: Add Valgrind memcheck test
samuelburnham a4a1076
Fmt
samuelburnham 495e6d9
Add LeanIOResult type and `--include-ignored` test flag
samuelburnham cdec7da
Move `lean.h` Rust bindings to separate subcrate
samuelburnham 5028eb2
Fmt
samuelburnham dc7a2e1
Refactor Iroh FFI
samuelburnham 7104fd1
Docs and address review
samuelburnham 32522af
Rename lean-sys to lean-ffi
samuelburnham 7302e67
Fixup
samuelburnham ffeb165
Abstract LeanObject usage where possible
samuelburnham 6b5494d
Encapsulate `build` and `decode` functions as methods
samuelburnham 73262b5
Fmt
samuelburnham d740c3f
Update LSpec and fix compile test
samuelburnham 2df4dfd
Merge ignored.yml and valgrind.yml
samuelburnham 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
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,47 @@ | ||
| name: Extended CI tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: main | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| ignored-test: | ||
| runs-on: warp-ubuntu-latest-x64-32x # Needs 128 GB RAM for Lean compilation | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| - uses: leanprover/lean-action@v1 | ||
| with: | ||
| auto-config: false | ||
| test: true | ||
| test-args: "-- --ignored" | ||
|
|
||
| valgrind: | ||
| runs-on: warp-ubuntu-latest-x64-16x | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| - uses: leanprover/lean-action@v1 | ||
| with: | ||
| auto-config: false | ||
| build: true | ||
| build-args: "IxTests" | ||
| - name: Install valgrind | ||
| run: sudo apt-get update && sudo apt-get install -y valgrind | ||
| - name: Run tests under valgrind | ||
| run: | | ||
| valgrind \ | ||
| --leak-check=full \ | ||
| --show-leak-kinds=definite,possible \ | ||
| --errors-for-leak-kinds=definite \ | ||
| --track-origins=yes \ | ||
| --error-exitcode=1 \ | ||
| .lake/build/bin/IxTests -- --include-ignored aiur aiur-hashes ixvm | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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.