semlanik / qtprotobuf

Protobuf generator and bindings for Qt framework
https://semlanik.github.io/qtprotobuf
MIT License
167 stars 38 forks source link

emscripten and protobuf dependency #181

Open gmabey opened 3 years ago

gmabey commented 3 years ago

I imagine the answer to this question might be obvious if I knew more about protobuf, but -- today I'm working to compile qtprotobuf using emscripten, towards targeting my application for wasm. I'll be sure to post some notes about how to accomplish that if I'm successful.

In the course of doing so, I'm now working to build all dependencies to facilitate that. Building Qt was pretty easy, as it's a supported platform. Next is protobuf, which just made me start to wonder why it's a dependency. Like, it would be a significant simplification for this kind of cross compiling effort if only protoc were needed. It's surely more complicated than that, right?

Also -- is it feasible to build qtprotobuf without grpc support?

semlanik commented 3 years ago

About crosscompilation, in regular case you don't need protoc built for target system, since it's generator supposed to be ran on host system only. Same for qtprotobufgen. It should be compiled for host system only while crossconpiling whole project. About conditional compilation without grpc support, I think that what need to be added to build procedure. Will to it soon.

gmabey commented 3 years ago

That is excellent news, and I think it will make it easier for others to use qtprotobuf also, since it will have fewer required dependencies.

Would you please consider assigning a milestone to this feature, so that I can have some idea as to when it may be available?

semlanik commented 3 years ago

I planned it for 0.6, but deadline for 0.6 is crossed and I have no time to complete it this year, unfortunately. Probably 0.7 is what I could promise and only next spring. Here is task https://github.com/semlanik/qtprotobuf/issues/149

gmabey commented 3 years ago

Ok -- that's helpful for me to know that much at least.

semlanik commented 3 years ago

@gmabey, have a question probably not directly related to the issue. Did you manage to make the network stack work in the wasm environment? Since the last time I tried network stack from wasm, it was blocked by chrome and ff.

gmabey commented 3 years ago

No, I just stopped work on it at that point. I might be able to try out that experiment tonight though -- it's a critical step that we'll have to figure out eventually.