Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
wasmer-compiler-cranelift
Advanced tools
The Cranelift compiler for the `wasmer` package (to compile WebAssembly module)
wasmer
is a complete and mature WebAssembly runtime for
Python. wasmer_compiler_cranelift
provides the Cranelift compiler to
wasmer
, so that wasmer
is able to compile WebAssembly module.
Other compilers exist:
wasmer_compiler_llvm
,wasmer_compiler_singlepass
.To get a more complete view, please see the documentation of the
wasmer
package itself.
This package must be used with the wasmer
package, thus:
$ pip install wasmer
$ pip install wasmer_compiler_cranelift
Any engines in wasmer.engine
can take the
wasmer_compiler_cranelift.Compiler
class as argument:
from wasmer import engine, Store, Module, Instance
from wasmer_compiler_cranelift import Compiler
# Let's use the Cranelift compiler with the JIT engine…
store = Store(engine.JIT(Compiler))
# … or with the native engine!
store = Store(engine.Native(Compiler))
# And now, compile the module.
module = Module(store, open('my_program.wasm', 'rb').read())
# Now it's compiled, let's instantiate it.
instance = Instance(module)
# And get fun, for example by calling the `sum` exported function!
print(instance.exports.sum(1, 2))
Browse the documentation at https://wasmerio.github.io/wasmer-python/api/wasmer_compiler_cranelift/.
Alternatively, run just build compiler-cranelift
followed by just doc
to generate the documentation inside
docs/api/wasmer_compiler_cranelift.html
.
FAQs
The Cranelift compiler for the `wasmer` package (to compile WebAssembly module)
We found that wasmer-compiler-cranelift demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.