Skip to content
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

Use of too many unsafe blocks #10

Open
aridgupta opened this issue Jan 30, 2021 · 1 comment
Open

Use of too many unsafe blocks #10

aridgupta opened this issue Jan 30, 2021 · 1 comment

Comments

@aridgupta
Copy link

I am moderately new to rust and since rust is primarily about fast performance while being safe, I was wondering why this library chose to use so many unsafe blocks?

@JP-Ellis
Copy link
Owner

This library unfortunately has to use a fairly large number of unsafe blocks due to the way references are used. I found when writing this that using pointers in Rust can be difficult without unsafe blocks.

This code was originally written a few years ago, and it is entirely possible that some of the unsafe code can be refactored into safe code. I wrote this as a learning experience for myself, but it ended up being quite usuable hence why I published it.

I might have another look if I have time, but you are welcome to submit pull requests too if you find anything!

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

No branches or pull requests

2 participants