-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #476 from streamingfast/feature/allow-wasmbindgen-…
…shims This enables running module with wasmbindgen shims by specifying runtime extension `wasm-bindgen-shims`
- Loading branch information
Showing
19 changed files
with
2,437 additions
and
17 deletions.
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,24 @@ | ||
package manifest | ||
|
||
import "strings" | ||
|
||
// SplitBinaryType splits a binary type in two components: the type ID and the raw extensions. | ||
// | ||
// The format is `<id>+<extensions>`, where `<id>` is the binary type ID and `<extensions>` | ||
// is a comma-separated list of runtime extensions that are type specific. The `+<extensions>` part | ||
// is optional and can be omitted. | ||
// | ||
// So we accept the following formats: | ||
// | ||
// - wasm/rust-v1 | ||
// - wasm/rust-v1+wasm-bindgen-shims | ||
// - wasm/rust-v1+wasm-bindgen-shims,other-extension=value | ||
// | ||
// This method returns the ID and the raw unsplitted extensions string. | ||
// The input `wasm/rust-v1+wasm-bindgen-shims,other-extension=value` would | ||
// result in ("wasm/rust-v1", "wasm-bindgen-shims,other-extension=value") being | ||
// returned to your | ||
func SplitBinaryType(in string) (typeID string, rawExtensions string) { | ||
typeID, rawExtensions, _ = strings.Cut(in, "+") | ||
return | ||
} |
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
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
Oops, something went wrong.