3 ms·
I'd also prefer a C version, but I think it's possible to call a Go function from C [0]. I don't know how well that would work though, since Go requires a runti
by TheAceOfHearts 8y ago
I'd also prefer a C version, but I think it's possible to call a Go function from C [0]. I don't know how well that would work though, since Go requires a runtime.
[0] https://github.com/golang/go/wiki/cgo#calling-go-functions-from-c https://github.com/golang/go/wiki/cgo#calling-go-functions-f...
- pjmlp 8y agoC also requires a runtime, it just happens to be a very tiny one.
- hobofan 8y agoThere is also a Rust implementation of libp2p[0]. Exposing C functions from that library is probably the most "proper" way currently feasible to use libp2p from C. [0]https://github.com/libp2p/rust-libp2p https://github.com/libp2p/rust-libp2p