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

Try rewriting common/ in Rust #242

Open
ueno opened this issue Aug 29, 2019 · 2 comments · May be fixed by #363
Open

Try rewriting common/ in Rust #242

ueno opened this issue Aug 29, 2019 · 2 comments · May be fixed by #363

Comments

@ueno
Copy link
Member

ueno commented Aug 29, 2019

It would be interesting to rewrite the internal utilities in Rust as librsvg does.

@vjardin
Copy link

vjardin commented Sep 17, 2019

Frankly, Rust is fun and I like many concepts. However, I strongly believe that for such low level library we should wait many years in order to make sure that Rust is here to stay for ever (like C does).

@ueno
Copy link
Member Author

ueno commented Mar 14, 2021

The Rust usage could be conditionalized through a build option, and not all files need to be ported to Rust. As we already moved to Meson, it should be fairly straightforward to integrate this kind of hardening:
https://nibblestew.blogspot.com/2021/03/mixing-rust-into-existing-c-shared.html

The candidate files are:

  • common/argv.c
  • common/array.c
  • common/buffer.c
  • common/dict.c
  • common/path.c
  • common/url.c (the hex encoding part)

Most of them would directly map to the Rust's std library.

@ueno ueno linked a pull request Mar 30, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants