wasmdec | wabt | |
---|---|---|
5 | 21 | |
390 | 6,401 | |
- | 1.3% | |
0.0 | 8.3 | |
3 months ago | 23 days ago | |
C++ | C++ | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
wasmdec
-
Capturing the WebGPU Ecosystem
I think you're missing a good amount of nuance here
minified JS can be turned into reasonable JS, yes, but you're probably not going to get TypeScript code back, so the same sort of challenge exists there.
Assembly -> high-level language is harder, but there are absolutely binary -> C decompilers that are very popular/used in the RE community to make changes to existing programs.
But that doesn't even matter, WASM is much higher level than assembly, it's a stack machine, there is no arbitrary control flow / labels / `goto`, there are pre-defined data types, etc. all of this means it's easier to convert WASM -> high-level language than it is with a generic x86/arm binary.
There are WASM decompilers[0][1] which can convert WASM binaries into C code and back.
In both cases (minified JS and WASM), you're not going to get out exactly what you put in, but WASM doesn't really change the situation very much given the widespread adoption of 'compile to JS' languages like TypeScript these days.
[0] https://chromium.googlesource.com/external/github.com/WebAss...
[1] https://github.com/wwwg/wasmdec
-
Would rewriting a JS library in WASM(Rust) provide sufficient obfuscation?
There are wasm2c and wasmdec that decompile to C. There is also rewasm, which decompiles WASM to Rust. But I don't know if they can reconstruct non-trivial logic, e.g. shapes of structures.
- Wasmdec: Converts WebAssembly binaries to C (2018)
-
Alternative for an existing plugin
Have you considered just transpiling it to C? Assuming it's the pseudocode you're after, that should be enough by itself. You could also lift it and recompile to whatever your preferred architecture is.
-
152kb WebAssembly interpreter that runs on six OSs with Cosmopolitan
This is not less portable and will beat any wasm interpreter in terms of speed: https://github.com/wwwg/wasmdec
wabt
-
Fortran on WebAssembly
https://github.com/WebAssembly/wabt/blob/main/wasm2c/README.... is a straightforward way to take an untrusted application (compiled already to wasm) and turn it into C that you can embed into your application or compile to a linkable DLL. I believe this approach has been used to sandbox untrusted libraries in production by Mozilla: https://hacks.mozilla.org/2021/12/webassembly-and-back-again...
-
Show HN: Mutable.ai – Turn your codebase into a Wiki
As long as this is happening, might as well try some of my favorites: https://github.com/wasm3/wasm3, https://github.com/WebAssembly/wabt, https://github.com/bytecodealliance/wasmtime
- Ask HN: Best blog tutorial explaining Assembly code?
-
Understanding Every Byte in a WASM Module
This seems sort of like understanding machine code vs assembly; it's much easier to learn WAT and translate to/from WASM as necessary using the wabt tools [0].
Either way its super cool how simple WebAssembly is, you can really get your hands dirty and understand exactly every detail of how your program runs!
[0] https://github.com/WebAssembly/wabt
-
Show HN: Gogosseract, a Go Lib for CGo-Free Tesseract OCR via Wazero
You mean this? https://github.com/WebAssembly/wabt/blob/main/wasm2c/README....
That seems like quite an undertaking. But at that point, It would make sense to cut out WASM entirely like https://datastation.multiprocess.io/blog/2022-05-12-sqlite-i...
-
WebAssembly: byte-code of the future
The .wat file can be compiled to a .wasm using wat2wasm which is part of the WebAssembly Toolkit CLI tools:
- DeviceScript: TypeScript for Tiny IoT Devices
-
Is anyone working/creating tools for wasm in C?
it is in C++ https://github.com/WebAssembly/wabt/blob/main/src/tools/wat2wasm.cc
-
How to hide script file?
I don't think you are building an application that will use Native Client technologies How to extract source code from Native Client .nexe file, migrate to WebAssembly? #1864 so that would be superfluous, and frankly, useless in your case.
-
Hey Rustaceans! Got a question? Ask here (5/2023)!
I'm trying to get a basic Rust webassembly program, then porting it to C via wasm2c. The example works, but when I use wasm-bindgen and analyze it with wasm2wat, I get an import "env". The issue is that in C (wasm2c) it comes out as struct Z_env_instance_t; and I can't instantiate it (as in Z_env_instance_t env; to pass it's address to Z_wasm_client_bg_instantiate.
What are some alternatives?
wasm3 - 🚀 A fast WebAssembly interpreter and the most universal WASM runtime
wasmr - Execute WebAssembly from R using wasmer
idawasm - IDA Pro loader and processor modules for WebAssembly
langs
trianglepacker - A C/C++ single-file library that packs triangles of a 3D mesh into a rectangle/texture.
perspective - A data visualization and analytics component, especially well-suited for large and/or streaming datasets.
rewasm - Decompiler for WebAssembly binaries
binaryen - Optimizer and compiler/toolchain library for WebAssembly
gpuweb - Where the GPU for the Web work happens!
wasmtime - A fast and secure runtime for WebAssembly
wgpu-native - Native WebGPU implementation based on wgpu-core
benchmarks - Some benchmarks of different languages