This post describes an experiment to call Rust code from Go with near-zero overhead, aimed at replacing assembly code for cryptographic operations. It explains why Rust is chosen over assembly and cgo, details the linking process, and provides a working example that integrates Rust and Go. The post concludes with performance

26m read timeFrom words.filippo.io
Post cover image
Table of contents
Why RustWhy not cgoLinking it togetherJumping into RustCalling conventionsIs it fast?A real examplePackaging upTurning it into a real thing
1 Comment

Sort: