golemcloud / golem

Golem is an open source durable computing platform that makes it easy to build and deploy highly reliable distributed systems.
https://learn.golem.cloud/
Apache License 2.0
530 stars 59 forks source link

`golem-client` on `wasm32-wasip2` target troubles #1073

Open smndtrl opened 21 hours ago

smndtrl commented 21 hours ago

Hi,

I'm trying to invoke a worker from our serverless functions and using reqwest via REST with typed json is a bit cumbersome. I looked into using your generated golem-client but due to its dependency on golem-common it pulls in a lot of crates that don't compile on wasm32-wasip2 that maybe don't need to be there for an API client to work like wasmtime or cranelift-codegen. I may also just have misunderstood what golem-clients purpose is.

wasmtime v21.0.1
├── golem-wasm-rpc v1.0.7
│   ├── golem-api-grpc v1.0.26
│   │   ├── golem-common v1.0.26
│   │   │   └── golem-client v1.0.26
vigoo commented 17 hours ago

That's true, we should introduce features into golem-common so those parts become optional. The generated client code only depends on this crate to share some of the model types instead of "regenerating" them.