Skip to content

Commit

Permalink
chore: add env for test and doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ihciah committed Dec 9, 2024
1 parent f4f1ffc commit 8653638
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
test:
name: build-and-test
runs-on: ubuntu-latest
env:
GODEBUG: invalidptr=0,cgocheck=0
steps:
- uses: actions/checkout@v4
- name: Setup sccache
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ On the Golang side, the data it receives is referenced from Rust. The Rust side

On the Rust side, it is needed to ensure that the slot pointer of the callback ffi operation, and the user parameters are valid when the future drops. This is archieved by implementing an atomic slot structure and providing a `[drop_safe]` attribute to require user passing parameters with ownership.

Note: Since golang may scan the stack, and when it meets peer pointer, it may panic. You should run the program with `GODEBUG=invalidptr=0,cgocheck=0` env to bypass it.

## Toolchain Requirements
- Golang: >=1.18
- For >=1.18 && < 1.20: generate golang code with `--go118`
Expand Down

0 comments on commit 8653638

Please sign in to comment.