new feature: generate C and Go operation options from core
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- backend-api-design, build-system
Direzione di ricerca
Start with dev/src/generate/c.rs, the handwritten option definitions in bindings/c/src/types.rs, and the Go option functions under bindings/go. Trace generated output through bindings/c/build.rs and the frozen-surface tests. Done means the intended C and Go options are generated and exposed as specified, with ABI and release-impact notes updated.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Drafted with AI assistance; the author is accountable for it.
Feature Description
Generate the C option structs and the Go options that fill them from core (one generate -l c run; Zig re-exports the header), then expose what both lack. Part of #9320, whose rules apply to every PR here.
Progress
One item per options struct, covering C and Go. A struct is done when its options are generated from core and every core field is exposed. New fields change struct layout, so they wait for one batched C/C++ layout break.
-
ListOptions- Generated from core (#9335)
-
glob
-
StatOptions- Generated from core (#9350)
- Version conditions
-
ReadOptions- Generated from core (#9379)
-
limitand version conditions
-
ReaderOptions- Generated from core (#9385)
- Version conditions
-
WriteOptions- Generated from core (#9389)
- Borrowed string rules for write entry points (#9409)
-
content_language,expires, version conditions,if_not_changed
-
DeleteOptions- Generated from core (#9368)
- Conditions
-
CopyOptions- Generated from core (#9402)
- Conditions and destination metadata
-
RenameOptions: needs a C entry point -
RestoreOptions,DeleterOptions,ComposeOptions: need entry points (core blocking compose: #9423) -
checksum(#9316)
Problem and Solution
Reference PRs: #9335 and #9350 (RELEASED_OPTIONS in dev/src/generate/c/options.rs). Regenerate with cargo run --manifest-path=dev/Cargo.toml -- generate -l c, then build the C binding so cbindgen refreshes opendal.h.
C and Go invariants
opendal.his ABI: member order, types,sizeof, offsets, and setter signatures stay as onmain.- Each field keeps its unset encoding, pointer constness, and string ownership, and the docs state them.
- Docs write
ErrorKind::Xas theopendal_codeand GoErrorCodefrombindings/c/src/error.rs. - Conversions reading caller pointers are
pub(crate) unsafe fnwith# Safety, called under// SAFETY:, never safeFrom. - Generating existing options adds no
#[no_mangle]symbol: Go resolves all C symbols at load, so new ones need rebuiltopendal-go-servicesand abindings/go/upgrade.mdnote. - New fields change
sizeof: declare it inbindings/c/upgrade.mdandrelease_impact.pyformat for C and Go.
Design questions for new fields: entry points for rename and the deleter, compose and restore functions, suffix ranges, and a copied const opendal_metadata * for if_not_changed.
Additional Context
Generating existing options is not release-impacting. New fields change the C ABI layout and the Go companion requirements.
Are you willing to contribute to the development of this feature?
- Yes, I am willing to contribute to the development of this feature.
- Lingua principale
- Rust
- Stelle
- 5.5k
- Fork
- 869
- Merge medio
- 8h 2m
- PR unite (30g)
- 862
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/opendal
-
bug(services/fs): deleting "/" removes the configured root directoryForse già presa @xgbtxy l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 81/100
apache/opendal#9635 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
core enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
apache/opendal#9572 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
fix(bindings/nodejs): reject negative and overflowing BigInt values in WriteOptions.chunk and Read/ReaderOptions.gapForse già presa @rohan4naik l’ha presa oggi. Apertabindings/nodejs bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
apache/opendal#9569 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug(layers/throttle): throttle streaming ReadStream bytes instead of pre-charging ReadOptions::limit upper bounds on open()Forse già presa @Xuanwo l’ha presa oggi. Apertabug core
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
apache/opendal#9567 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bindings/c bindings/dotnet bindings/go bindings/java bindings/python bindings/ruby core integrations/object_store release release-blocker services/azblob services/azdls services/dropbox services/gcs_grpc services/git services/hf3fs services/redis services/remotestorage services/s3 website
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
apache/opendal#9560 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/opendal
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Choochmeque/tauri-plugin-webdriver#134 ·
I maintainer di solito rispondono entro 17 giorni
-
bug(c-sdk): boxlite_box_exec does not check runtime liveness before dispatching streaming execApertabug rust SDK & CLI & REST API
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
boxlite-ai/boxlite#3292 ·
I maintainer di solito rispondono entro 1 giorno
-
Android bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anefzaoui/misterdownloadmanager#2516 ·
I maintainer di solito rispondono entro 1 giorno
-
editor ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
state:triage tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 89/100
agent8-cash/ethpayserver#731 ·
I maintainer di solito rispondono entro 1 giorno