Create and upstream a magic(5) entry for webcil
lambdageek opened this issue · 3 comments
(Contributes to #80807)
The upstream mailing list is https://mailman.astron.com/pipermail/file/
a readonly mirror of the git repo is https://github.com/file/file
We should identify .wasm files containing a webcil payload as something more than just
WebAssembly (wasm) binary module version 0x1 (MVP)
By contrast .dll
files print out:
PE32 executable (DLL) (console) Intel 80386 Mono/.Net assembly, for MS Windows
So ideally for a webcil file we print
WebAssembly (wasm) binary module version 0x1 (MVP), .NET assembly Webcil wrapper version 0x0 payload version 0.0
that includes the version of the wasm wrapper (and possibly the version of the webcil payload - not sure how hard it would be to write a magic rule to extract that)
The webcil format is documented in https://github.com/dotnet/runtime/blob/main/docs/design/mono/webcil.md
Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.
Issue Details
The upstream mailing list is https://mailman.astron.com/pipermail/file/
a readonly mirror of the git repo is https://github.com/file/file
We should identify .wasm files containing a webcil payload as something more than just
WebAssembly (wasm) binary module version 0x1 (MVP)
By contrast .dll
files print out:
PE32 executable (DLL) (console) Intel 80386 Mono/.Net assembly, for MS Windows
So ideally for a webcil file we print
WebAssembly (wasm) binary module version 0x1 (MVP), Webcil version 0x0 .NET assembly
that includes the version of the wasm wrapper (and possibly the version of the webcil payload - not sure how hard it would be to write a magic rule to extract that
Author: | lambdageek |
---|---|
Assignees: | - |
Labels: |
|
Milestone: | - |
Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.
Issue Details
The upstream mailing list is https://mailman.astron.com/pipermail/file/
a readonly mirror of the git repo is https://github.com/file/file
We should identify .wasm files containing a webcil payload as something more than just
WebAssembly (wasm) binary module version 0x1 (MVP)
By contrast .dll
files print out:
PE32 executable (DLL) (console) Intel 80386 Mono/.Net assembly, for MS Windows
So ideally for a webcil file we print
WebAssembly (wasm) binary module version 0x1 (MVP), Webcil version 0x0 .NET assembly
that includes the version of the wasm wrapper (and possibly the version of the webcil payload - not sure how hard it would be to write a magic rule to extract that
Author: | lambdageek |
---|---|
Assignees: | - |
Labels: |
|
Milestone: | - |
Is it even possible to decode uleb128 values using magic(5)? if not, it will be pretty difficult to traverse the file. Although maybe it's good enough to look for 'webcilVersion' and 'WbIL' and match what follows them - the nearby bytes are probably pretty distinctive