new feature: generate operation options for all bindings from core

Open
#9,320 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active

Research direction

Start with core/core/src/types/options.rs and the shared parser in dev/src/generate/core_options.rs, then inspect the selected binding’s generator and tests. Follow the binding-specific sub-issue, since API shape and prerequisites differ, and keep the shared generator changes isolated where the issue requires. Done means the binding’s existing and missing operation options are generated from core and its CI diff check, including check_generated in .github/workflows/ci_odev.yml, passes.

Written by the indexing model from the issue text.

Description

bindings/c bindings/cpp bindings/d bindings/dart bindings/dotnet bindings/go bindings/haskell bindings/java bindings/lua bindings/moonbit bindings/nodejs bindings/ocaml bindings/php bindings/python bindings/ruby bindings/swift bindings/zig core enhancement

Drafted with AI assistance; the author is accountable for it.

Feature Description

Generate each binding's *Options from core/core/src/types/options.rs via dev/src/generate/core_options.rs, like #9122 and #9129 did for Capability and Metadata.

Problem and Solution

Each binding sub-issue keeps one checklist item per options struct. A struct is done when its options are generated from core and every core field is exposed. Positional and layout surfaces stay append-only.

  • .NET: #8440
  • Java: #8650 (#9233, #9234)
  • Java: copy, rename, compose, restore, and deleter options (not covered by #8650)
  • Python: #9321
  • Node.js: #9322
  • C and Go: #9323
  • C++: #9324
  • Ruby: #9325 (API shape to be agreed first; not planned immediately)
  • OCaml: #9326 (API shape to be agreed first; not planned immediately)
  • Zig: the Operator wrapper takes no options; users reach the C option structs through opendal.c (#9323)
  • Haskell: exposes only WriterOption.woAppend
  • Lua: no operation options
  • PHP: no operation options
  • Dart: no operation options
  • D: no operation options
  • Swift: no operation options
  • MoonBit: no operation options

Bindings without a sub-issue are open for anyone.

Rules for every binding PR
  • Compute gaps on a fresh main: unlisted fields silently get core defaults.
  • Generating existing options changes no API, ABI, or behaviour, only docs. Prove it with a surface diff and an old-consumer probe against main.
  • Docs are core's full doc comments in binding names (#9334). Check each claim on a real build; fix wrong core docs in options.rs for every binding (#9348).
  • Tests must fail when broken: exact member sets, full doc paragraphs from core, frozen literals from main, each mutation-proven.
  • Merge (not rebase) origin/main before each push and rerun every ci_odev.yml generator. Touch core_options.rs or rustdoc.rs only if other bindings' output stays unchanged.
  • A PR that exposes a new option names the caller and operation for it (Xuanwo). checksum follows #9316. ReadOptions::limit intentionally rejects a positive chunk, concurrent > 1, and presign with ConfigInvalid (#9200 closed); ReaderOptions has no limit.
Additional Context

C and Go share generate -l c, so each PR covers both. #9316 changes every Metadata output. Related: #8436, #8440, #8650, #9319 (resolved).

Are you willing to contribute to the development of this feature?
  • Yes, I am willing to contribute to the development of this feature.
Dominant language
Rust
Stars
5.5k
Forks
869
Avg merge
8h 2m
Merged PRs (30d)
862

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/opendal

All issues in apache/opendal

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.