Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create and upstream a magic(5) entry for webcil #86522

Open
Tracked by #80807
lambdageek opened this issue May 19, 2023 · 3 comments
Open
Tracked by #80807

Create and upstream a magic(5) entry for webcil #86522

lambdageek opened this issue May 19, 2023 · 3 comments
Labels
arch-wasm WebAssembly architecture area-Meta documentation Documentation bug or enhancement, does not impact product or test code
Milestone

Comments

@lambdageek
Copy link
Member

lambdageek commented May 19, 2023

(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

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 19, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label May 19, 2023
@lambdageek lambdageek added documentation Documentation bug or enhancement, does not impact product or test code arch-wasm WebAssembly architecture labels May 19, 2023
@ghost
Copy link

ghost commented May 19, 2023

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:

documentation, arch-wasm, untriaged, needs-area-label

Milestone: -

@ghost
Copy link

ghost commented May 19, 2023

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:

documentation, arch-wasm, area-Meta, untriaged, needs-area-label

Milestone: -

@lambdageek
Copy link
Member Author

lambdageek commented May 19, 2023

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

@lambdageek lambdageek removed untriaged New issue has not been triaged by the area owner needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels May 19, 2023
@lewing lewing added this to the 9.0.0 milestone Jul 21, 2023
@pavelsavara pavelsavara modified the milestones: 9.0.0, Future Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Meta documentation Documentation bug or enhancement, does not impact product or test code
Projects
None yet
Development

No branches or pull requests

3 participants