pulsar-rs icon indicating copy to clipboard operation
pulsar-rs copied to clipboard

Provide lib as WASM?

Open shevernitskiy opened this issue 2 years ago • 3 comments

Is it possible to compile lib into wasm? In this case it will be usable in Deno. Deno community will be happy and appreciate for that:)

shevernitskiy avatar Sep 17 '22 10:09 shevernitskiy

Hey, I am interested by this use case as well. To me Deno is written in Rust, so it could be use as-is :thinking:. Could you give me the reason why Deno community need a wasm version?

FlorentinDUBOIS avatar Oct 28 '22 13:10 FlorentinDUBOIS

Hey, I am interested by this use case as well. To me Deno is written in Rust, so it could be use as-is 🤔. Could you give me the reason why Deno community need a wasm version?

Deno is written in rust to work with js/ts. For example I would like to have a ts client on deno. If you take node.js, it uses C++ bindings and ready c++ client library, it's about the same here, only rust + deno. I.e. you can take an already ready client in rust, compile into wasm and use in deno applications on ts as a normal dependency.

shevernitskiy avatar Oct 28 '22 17:10 shevernitskiy

I'm also interested in WASM but for Lunatic. Basically I'm building a network for distributed system (see fólkvangr where you compile your services to WASM and execute them using runtime similar to Erlang's Beam as additional security layer. My use case for Pulsar is a notification dispatcher which consumes messages from other services in the network, processes them with Arrow and then forwards them to e.g. admin panel, mobile devices or send emails etc.

I will have to do more tests but it may require a feature flag which gates lunatic as dependency for currently unsupported parts of std. In the future, Pulsar should be fully comaptible without any changes once cranelift (rust jit) will be merged as fully featured part of rustc.

heavyrain266 avatar Jan 07 '23 12:01 heavyrain266