idea: Introduce Codegen into OpenDAL
- Dominant language
- Rust
- Stars
- 5.4k
- Forks
- 825
- Avg merge
- 1d 14m
- Merged PRs (30d)
- 127
Description
The main obstacles preventing our users from trying out bindings are the documentation, including API docs, examples, and more.
However, OpenDAL now supports over 50 services, with more being added continuously. Our bindings have also grown, now totaling 14. It's neither possible nor wise to attempt filling this gap manually. We have discussed about this many times, for example, https://github.com/apache/opendal/issues/3537.
So I think it's time for us to introduce codegen to help us:
- rust: Generate Config
- rust: Generate Builder's API that plays with Config
- rust: Generate Examples
- python: Generate API Stub
- python: Generate Examples
- ...
I have build a demo at https://github.com/apache/opendal/pull/4278.
During building the demo, I found it's useful even just for rust:
- The same `mask_secret` for all services
- The same `sensitive`, `required` metadata
- Remove the need to duplicate builder API
So what do you think about this?
Contributor guide
Research direction
Read the discussion in issue #3537 and the demo in pull request #4278 first. Identify the intended code-generation scope for Rust Config and builder APIs, plus Python stubs and examples. This issue does not define a concrete entry point, acceptance criteria, or a single meaning of done, so the design needs agreement before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100