Skip to content

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Oct 18, 2024

This PR updates to Rust 1.82.

The main change is in the safety of the bindings with the JS.

After some thinking, it seems to me that all functions where the JS reads memory from the Rust are safe. Yes the JS might throw an exception for example if the pointer is out of range, but that's similar to a Rust panic and not something unsafe.

The functions where the JS writes to the Rust memory are, of course, unsafe. Calling buffer_copy(0, rand::random()) is a very bad idea.

Work time: 30mn

@tomaka tomaka added this pull request to the merge queue Nov 7, 2024
Merged via the queue into smol-dot:main with commit bf611aa Nov 7, 2024
21 checks passed
@tomaka tomaka deleted the rust-1.82 branch November 7, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant