-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add modified module definition for php protobufs
- Loading branch information
Showing
9 changed files
with
937 additions
and
0 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,77 @@ | ||
syntax = "proto3"; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
|
||
// Used to type the arguments and return types from wasm elements such as import | ||
// and export functions. | ||
enum ValType { | ||
I32 = 0; | ||
I64 = 1; | ||
F32 = 2; | ||
F64 = 3; | ||
V128 = 4; | ||
FuncRef = 5; | ||
ExternRef = 6; | ||
} | ||
|
||
// Contained by an import or export element within a wasm binary. | ||
message Function { | ||
repeated ValType params = 1; | ||
repeated ValType results = 2; | ||
string name = 3; | ||
} | ||
|
||
// A function and module namespace that is defined outside of the current | ||
// module, and referenced & called by the current module. | ||
message Import { | ||
string module_name = 1; | ||
Function func = 2; | ||
} | ||
|
||
// A function that is defined inside the current module, made available to | ||
// outside modules / environments. | ||
message Export { Function func = 1; } | ||
|
||
// The language (or most similar match) used to produce a wasm module. | ||
enum SourceLanguage { | ||
Unknown = 0; | ||
Rust = 1; | ||
Go = 2; | ||
C = 3; | ||
Cpp = 4; | ||
AssemblyScript = 5; | ||
Swift = 6; | ||
JavaScript = 7; | ||
Haskell = 8; | ||
Zig = 9; | ||
} | ||
|
||
// Details about a wasm module, either extracted directly from the binary, or | ||
// inferred somehow. | ||
message Module { | ||
// ID for this module, generated by the database. | ||
int64 id = 1; | ||
// sha256 hash of the modules raw bytes | ||
string hash = 3; | ||
// function imports called by the module (see: | ||
// <https://github.com/WebAssembly/design/blob/main/Modules.md#imports)> | ||
repeated Import imports = 4; | ||
// function exports provided by the module (see: | ||
// <https://github.com/WebAssembly/design/blob/main/Modules.md#exports)> | ||
repeated Export exports = 5; | ||
// size in bytes of the module | ||
uint64 size = 6; | ||
// path or locator to the module | ||
string location = 7; | ||
// programming language used to produce this module | ||
SourceLanguage source_language = 8; | ||
// arbitrary metadata provided by the operator of this module | ||
map<string, string> metadata = 9; | ||
// timestamp when this module was loaded and stored | ||
google.protobuf.Timestamp inserted_at = 10; | ||
// the interned strings stored in the wasm binary (panic/abort messages, etc.) | ||
repeated string strings = 11; | ||
// function hashes | ||
map<string, string> function_hashes = 15; | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.