-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Requested in rust-lang/rust#136395 (comment)
- Loading branch information
1 parent
fc4f633
commit 58897bf
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# `wit-bindgen-rt` | ||
|
||
This is an internal implementation detail of the [`wit-bindgen`] crate. The | ||
source for this crate lives at https://github.com/bytecodealliance/wit-bindgen | ||
and this crate is located in `crates/guest-rust/rt` folder. The purpose of this | ||
crate is to contain "runtime" code related to the macro-expansion of the | ||
`wit_bindgen::generate!` macro such that the `wit-bindgen` crate dependency can | ||
be removed in some situations. | ||
|
||
This crate contains a precompiled object file and archive at | ||
`src/cabi_realloc.o` and `src/libwit_bindgen_cabi_realloc.a`. This is compiled | ||
from the source `src/cabi_realloc.c` and is checked in as precompiled to avoid | ||
needing a C compiler at compile-time which isn't always available. This object | ||
file is only used on wasm targets. | ||
|
||
The object file is compiled by | ||
[this script]https://github.com/bytecodealliance/wit-bindgen/blob/main/ci/rebuild-libcabi-realloc.sh) | ||
and is verified in repository continuous integration that the checked-in | ||
versions match what CI produces. | ||
|
||
[`wit-bindgen`]: https://crates.io/crates/wit-bindgen | ||
|