Hacker News new | ask | show | jobs
by stirner 3370 days ago
What does Zig have to offer over Rust's FFI[1]?

Also, it might be useful to know that HN's comment syntax isn't Markdown, though it shares a few features like indenting for code blocks and asterisks for italics. Markdown-style links are not supported.

[1] https://doc.rust-lang.org/book/ffi.html

2 comments

Of course, not only are markdown style links unsupported, nothing but raw urls are supported as links. For whatever reason, the majority of people here choose to relate links to locations in text using a particular footnote style. Since this format is no more blessed than the common markdown style, they could have easily chosen that instead. Presumably, they didn't because it breaks flow when using long links. For short links, like the one in the GP, inline links work just as well as footnote based ones, and provide the extra benefit of not requiring scrolling to follow them.
If there's no need to tell a parser where the link text begins and ends, then putting the URL in parentheses after the relevant text (without square brackets) would be less fussy.

The "HN style" of citation/linking is basically the IEEE citation style. You could call it "blessed".

http://www.ijssst.info/info/IEEE-Citation-StyleGuide.pdf

https://www.ieee.org/documents/ieeecitationref.pdf

As an addendum, using a Rust library in C is quite easy: https://doc.rust-lang.org/1.2.0/book/rust-inside-other-langu...