MCPcopy Index your code
hub / github.com/bytecodealliance/wasm-component-ld

github.com/bytecodealliance/wasm-component-ld @v0.5.25

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.5.25 ↗ · + Follow
68 symbols 163 edges 5 files 7 documented · 10%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

wasm-component-ld

This crate contains a binary named wasm-component-ld which is a wrapper around two pieces of functionality used to produce a WebAssembly Component

  1. The wasm-ld linker driver provided by LLVM
  2. The [wit_component::ComponentEncoder] type

This binary will first invoke wasm-ld and then run the componentization process to produce a final component.

Installation

This repository provides precompiled binaries of wasm-component-ld. This repository can also be installed with [cargo binstall].

Installations of wasi-sdk have this binary packaged by default in the sysroot and the Rust wasm32-wasip2 target, upon reaching tier 2, will also come packaged with this binary included.

This means that while a version can be installed manually it should not be required to do so.

Options

The wasm-component-ld binary is suitable to use as a linker driver during compilations. For Clang and Rust the wasm32-wasip2 target will automatically invoke this binary as the linker.

This means that wasm-component-ld forwards most of its arguments to wasm-ld. Additionally all flags of wasm-ld are supported and forwarded to wasm-ld. For example you can invoke the linker like wasm-component-ld --max-memory=N ....

The wasm-component-ld binary has a few custom arguments for itself as well which are not forwarded to wasm-ld and can be explored with -h or --help.

License

This project is triple licenced under the Apache 2/ Apache 2 with LLVM exceptions/ MIT licences. The reasoning for this is: - Apache 2/ MIT is common in the rust ecosystem. - Apache 2/ MIT is used in the rust standard library, and some of this code may be migrated there. - Some of this code may be used in compiler output, and the Apache 2 with LLVM exceptions licence is useful for this.

For more details see - Apache 2 Licence - Apache 2 Licence with LLVM exceptions - MIT Licence

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache 2/ Apache 2 with LLVM exceptions/ MIT licenses, shall be licensed as above, without any additional terms or conditions.

Core symbols most depended-on inside this repo

nonstandard
called by 62
src/lib.rs
push
called by 31
src/argfile.rs
next
called by 9
src/argfile.rs
compile
called by 9
tests/all.rs
assert_component
called by 9
tests/all.rs
status
called by 5
src/lib.rs
output
called by 4
src/lib.rs
file
called by 4
tests/all.rs

Shape

Function 35
Method 21
Class 9
Enum 3

Languages

Rust100%

Modules by API surface

src/lib.rs26 symbols
tests/all.rs20 symbols
ci/publish.rs12 symbols
src/argfile.rs9 symbols
src/main.rs1 symbols

For agents

$ claude mcp add wasm-component-ld \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact