Replying to Avatar MichaelJ

nostr:npub1m4ny6hjqzepn4rxknuq94c2gpqzr29ufkkw7ttcxyak7v43n6vvsajc2jl thanks for the tag!

nostr:npub1qdjn8j4gwgmkj3k5un775nq6q3q7mguv5tvajstmkdsqdja2havq03fqm7 I saw this repo a week or so ago, and starred it so I could find it easily later.

One of the next features I intend to add on NostrSDK is a built-in signer. Right now, I've stubbed out an interface for the sake of testing, but it doesn't actually sign anything. I think noscrypt will be a perfect fit for doing the heavy lifting of signing events. Keeping it all in C/C++ land and using only common and lightweight libraries is exactly what I'm trying to do with NostrSDK.

As an aside, I'm curious how you're setting up noscrypt to work with C#. I want to do something similar for NostrSDK–that is, make it interoperable with other languages/frameworks, so we can support more than just C/C++ devs.

Yes I saw, appreciate it! nostr:npub1m4ny6hjqzepn4rxknuq94c2gpqzr29ufkkw7ttcxyak7v43n6vvsajc2jl shared it too. Also appreciated!

Interop with with modern .NET (5.0 and above) just uses Platform Invoke (PInvoke) to access exported symbols in position independent shared libraries. I'm not experienced in C++, but I do remember something about symbol mangling.

So technically nothing on the C side of things, just telling the compiler to export symbols in a shared library.

Reply to this note

Please Login to reply.

Discussion

Thanks for the info!

I'm going to be deep in the weeds of C++ interop pretty soon. I've already peeked at the options, and they look interesting.

For Python, maybe C#, and some other languages, it may be as simple as exporting symbols so other languages can invoke the compiled binary.

For other languages or environments, I've been looking into gRPC, either with inter-process communication (IPC) or as a client-server connection over HTTP. Theoretically, a really lightweight client could use a remote server running NostrSDK with gRPC as a BFF for interacting with Nostr relays. I'm excited to dig into those possibilities!

I haven't farted much with C/nodejs interop, but I do believe that is a fairly simple option as well.