Proposed changes to `bindings --pkg-name`

Open
#65 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go, wasm
Domain
cli, tooling

Research direction

Start by reviewing the bindings --pkg-name behavior in wit-bindgen-go and componentize-go, using the current command sequence in the issue as the baseline. The work is done when componentize-go bindings --output internal --pkg-name internal creates both imports and exports folders and the separate --export-pkg-name option can be removed.

Written by the indexing model from the issue text.

Description

I think that the bindings --pkg-name option should automatically create imports and exports folders. This would mean that we could also remove the bindings --export-pkg-name option. I think this would offer more clarity and less friction. This will require edits to both wit-bindgen-go and componentize-go.

Just in case the above isn't clear:

Current:

$ mkdir -p internal/exports
$ componentize-go \
    bindings \
    --output internal/imports \
    --pkg-name internal/imports \
    --export-pkg-name internal/exports
$ mv internal/imports/wit_exports imports/exports
$ ls internal
exports  imports

Proposed:

$ componentize-go bindings --output internal --pkg-name internal
$ ls internal
exports  imports

@dicej Any thoughts/concerns?

Dominant language
Rust
Stars
18
Forks
8
Avg merge
6h 57m
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

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 bytecodealliance/componentize-go

All issues in bytecodealliance/componentize-go

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.