-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Should this move to be Rust-backed? #107
Comments
As long as the test suite passes, it should be fine. (And I'm in favour of such a change, definitely!) I should say, though, that in part due to that design goal, Comrak isn't as performant as the main other CommonMark renderer, pulldown-cmark. Comparison using $ make bench PROG=build/src/cmark-gfm
{ for x in `seq 1 20` ; do \
/usr/bin/env time -p build/src/cmark-gfm </dev/null >/dev/null ; \
/usr/bin/env time -p build/src/cmark-gfm < bench/benchinput.md >/dev/null ; \
done \
} 2>&1 | grep 'real' | awk '{print $2}' | python3 'bench/stats.py'
mean = 1.0915, median = 1.0850, stdev = 0.0556
$ make bench PROG=(which pulldown-cmark)
{ for x in `seq 1 20` ; do \
/usr/bin/env time -p /Users/kivikakk/.cargo/bin/pulldown-cmark </dev/null >/dev/null ; \
/usr/bin/env time -p /Users/kivikakk/.cargo/bin/pulldown-cmark < bench/benchinput.md >/dev/null ; \
done \
} 2>&1 | grep 'real' | awk '{print $2}' | python3 'bench/stats.py'
mean = 0.6930, median = 0.6900, stdev = 0.0223
$ It appears to pass all but one of the current spec tests; Comrak currently passes all but a different one. |
(I guess the other thing is — extension support may vary from |
Addressed by #186 |
This is primarily intended as a question to @kivikakk though I welcome any questions/concerns from other dependents.
Lately, I've been thinking about moving the backing library of this project from a C implementation to a Rust implementation. I have experience wrapping Rust crates in Ruby gems already.
Now, I love C. I cut my teeth on C. I think C has a lot to teach programmers about the fundamentals of software.
But I am old now, and I don't have the time or inclination to think about segfaults and memory leaks. And I like Rust. I think it's great.
Part of my concern about making the switch is that I don't know what lingering implications this might have. I like that comrak's stated goal is to "model the upstream cmark-gfm as closely as possible in terms of code structure." Are there any other issues I should be thinking about? In my mind, as long as the existing test suite passes, everything should be totally fine....right?
The text was updated successfully, but these errors were encountered: