Repository navigation
chore(deps): upgrade rustler crate to 0.39 #166
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
2 commits
Select commit
Hold shift + click to select a range
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
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
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
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,50 @@ | ||
| //! Stand-ins for the BEAM's `enif_*` functions in Linux test and fuzz binaries. | ||
| //! | ||
| //! rustler 0.39 references these as plain extern symbols on Linux and leaves the | ||
| //! BEAM to supply them when it loads the NIF (rusterlium/rustler#764). A test or | ||
| //! fuzz binary has no BEAM, and x86_64 binds every symbol at start-up, so each one | ||
| //! the binary references must exist even though the Rust tests never call them. | ||
| //! Each stub aborts if it is ever called. The NIF itself never includes this file. | ||
| //! | ||
| //! The list is every `enif_*` symbol the test and fuzz binaries reference, from | ||
| //! `nm -u`. If a rustler upgrade references another, linking fails and names it. | ||
|
|
||
| // `no_mangle` counts as unsafe because an exported name can collide with another | ||
| // symbol. Supplying these names is the whole point, and only in binaries with no BEAM. | ||
| #![allow(unsafe_code)] | ||
|
|
||
| fn called_outside_beam(name: &str) -> ! { | ||
| eprintln!("{name} was called, but only the BEAM can provide it"); | ||
| std::process::abort() | ||
| } | ||
|
|
||
| macro_rules! enif_stubs { | ||
| ($($name:ident)*) => { | ||
| $( | ||
| #[no_mangle] | ||
| pub extern "C" fn $name() { | ||
| called_outside_beam(stringify!($name)) | ||
| } | ||
| )* | ||
| }; | ||
| } | ||
|
|
||
| enif_stubs! { | ||
| enif_alloc enif_alloc_binary enif_alloc_env enif_binary_to_term enif_clear_env | ||
| enif_compare enif_compare_monitors enif_consume_timeslice enif_free enif_free_env | ||
| enif_get_atom enif_get_atom_length enif_get_double enif_get_int enif_get_list_cell | ||
| enif_get_local_pid enif_get_long enif_get_map_size enif_get_map_value enif_get_tuple | ||
| enif_get_uint enif_get_ulong enif_hash enif_inspect_binary | ||
| enif_inspect_iolist_as_binary enif_is_atom enif_is_binary enif_is_empty_list | ||
| enif_is_exception enif_is_fun enif_is_identical enif_is_list enif_is_map | ||
| enif_is_number enif_is_pid enif_is_port enif_is_process_alive enif_is_ref | ||
| enif_is_tuple enif_make_atom_len enif_make_badarg enif_make_binary enif_make_copy | ||
| enif_make_double enif_make_existing_atom_len enif_make_list_from_array | ||
| enif_make_long enif_make_map_from_arrays enif_make_map_put enif_make_map_remove | ||
| enif_make_map_update enif_make_new_binary enif_make_new_map enif_make_ref | ||
| enif_make_tuple_from_array enif_make_ulong enif_map_iterator_create | ||
| enif_map_iterator_destroy enif_map_iterator_get_pair enif_map_iterator_next | ||
| enif_map_iterator_prev enif_open_resource_type_x enif_raise_exception | ||
| enif_realloc_binary enif_release_binary enif_schedule_nif enif_self enif_snprintf | ||
| enif_term_to_binary enif_term_type enif_thread_type | ||
| } |
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
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.