Commit Graph

857 Commits

Author SHA1 Message Date
Sven Sauleau
ed0951fbce add basic coredump generation
This change adds a basic coredump generation after a WebAssembly trap
was entered. The coredump includes rudimentary stack / process debugging
information.

A new CLI argument is added to enable coredump generation:

```
wasmer --coredump-on-trap=/path/to/coredump/file module.wasm
```

See docs/en/examples-coredump.md.

Refs https://github.com/wasmerio/wasmer/issues/3578
2023-02-27 21:12:28 +00:00
Syrus Akbary
826d32194d Merge branch 'master' into std-api
# Conflicts:
#	lib/api/src/js/mem_access.rs
#	lib/api/src/js/mod.rs
#	lib/api/src/sys/typed_function.rs
#	lib/wasi/src/syscalls/wasix32.rs
#	lib/wasi/src/syscalls/wasix64.rs
#	lib/wasi/src/utils/mod.rs
2023-02-24 14:13:02 -08:00
Syrus Akbary
9ed86ad6db Make cli compilable again 2023-02-24 13:51:37 -08:00
Syrus Akbary
1f64ba13e0 Wrap engine 2023-02-24 13:35:46 -08:00
ptitSeb
5cf54b4f42 [CREATE-EXE] Link with Security framework when cross-compiling on macOS (and the framework definition is embedded in create-exe) 2023-02-23 14:00:14 +01:00
Christoph Herzog
df6434fcac Ensure WasiEnv cleanup in CLI 2023-02-23 10:45:10 +01:00
Christoph Herzog
16e92ff680 Rename SpecialFile to DeviceFile
Because some people don't like anything special in their code base...
2023-02-22 23:19:01 +01:00
Christoph Herzog
4d0460e2c6 Merge remote-tracking branch 'origin/master' into wasix 2023-02-22 11:15:16 +01:00
Christoph Herzog
af746cf284 chore: Don't ignore path creation error in create_exe code 2023-02-22 11:04:31 +01:00
Christoph Herzog
34c5bfe124 c-api: wasi_env_delete now cleans up the WasiEnv state
Needed for proper cleanup of state.
2023-02-22 11:04:31 +01:00
ptitSeb
c9e658e25e Update rkyv 0.7.40 and prettytable-rs to 0.10.0 (#3593) 2023-02-21 12:33:42 +01:00
ptitSeb
dc05bd111b Removed new ExportError::SerializationFailed, as it's not used 2023-02-15 14:50:30 +01:00
ptitSeb
247de6f8bf Fixed wasmer_create_exe_main.c C file for non PIRITA_WASI config 2023-02-15 11:36:46 +01:00
Christoph Herzog
93a0cd6bbf cli: Add a --net flag to run command for enabling networking
WASIX networking will now only be enabled if the --net flag is provided.
Otherwise it would break the Wasmer sandboxing promise.

In the future we should add more advanced networking config.
(like only allow certain ports, limit dns domains, limit ip ranges, etc )
2023-02-15 11:25:17 +01:00
Syrus Akbary
92255601fe Merge branch 'master' into std-api
# Conflicts:
#	lib/api/src/sys/instance.rs
2023-02-11 18:19:10 -08:00
Christoph Herzog
0b6c07a5a7 wasi: Improve global tokio runtime detection in TokioTaskManager
Make sure to not create a new runtime if in an async context already.
2023-02-10 20:22:50 +01:00
Syrus Akbary
543e7cb945 Make CI happy. Fix linting and imports 2023-02-10 08:05:07 -08:00
Christoph Herzog
02245ce1f0 chore: Fix clippy lints 2023-02-10 11:37:36 +01:00
Christoph Herzog
082715aea3 wasi: Refactor TTY System
* Remove all the STDIO related methods from the WasiRuntime trait

* Remove the special-cased Stdio VirtualFile types that where needed due to
  the above WasiRuntime trait integration

* Replace the WasiRuntime::{get,set}_tty methods with a dedicated optional
  TtyBridge trait

* Update the Console to always require a full WasiBidirectionalPipePair
  which is used for stdio
2023-02-08 19:48:50 +01:00
Christoph Herzog
0819c9a811 build: Remove compiler-specific features from wasi crate
For historic reasons the wasi crate had features to toggle between the
different Wasmer compilers.

This is not needed anymore.
2023-02-08 17:26:42 +01:00
Christoph Herzog
ff4ccf5083 refactor(wasi): Make WasiState private
Makes the WasiState type private, and replaces it's usage with WasiEnv
where needed.

WasiState is a complex type with many implementation details, it should
not be public.
2023-02-08 16:52:30 +01:00
Christoph Herzog
8b0d1fc302 wasi: Partial unification of instance spawning
Introduces a new WasiEnvInit type that should hold all information
required for initializing an instance.

An instance can then be created with WasiEnv::instantiate().
This method takes care of all the required setup steps to properly run a
wasi(X) module.
2023-02-08 14:36:01 +01:00
Christoph Herzog
956ad2821a Improve WasiBuilder API
First step in improving the wasi module construction flow.
Lots of steps to follow.
2023-02-08 12:54:08 +01:00
Christoph Herzog
7f8c0858b3 Merge remote-tracking branch 'origin/master' into wasix 2023-02-07 11:38:04 +01:00
Felix Schütt
4360c6faa0 Fix CLI unit tests 2023-02-03 07:34:32 +01:00
Felix Schütt
e25f0a981c Fix make lint 2023-02-03 00:17:55 +01:00
Felix Schütt
6a276075fd Merge branch 'master' into fix-create-exe-underscore 2023-02-02 23:29:55 +01:00
Christoph Herzog
50dd7270a5 Delete unused C file (rebase left-over)
File is an artifact of a big rebase, not needed any longer.
2023-02-02 22:12:23 +01:00
Christoph Herzog
a3cda991a3 Merge remote-tracking branch 'origin/master' into wasix 2023-02-02 19:23:13 +01:00
Felix Schütt
419e8cf132 Fix unit test 2023-02-02 16:15:26 +01:00
Syrus Akbary
545a12ac93 Update login.rs 2023-02-02 15:58:20 +01:00
Syrus Akbary
d2bc1a6a60 Update login.rs 2023-02-02 15:57:57 +01:00
Syrus Akbary
42fd09bcfb Move tunables into engine 2023-01-30 20:18:22 +01:00
Christoph Herzog
28620c88f4 Merge branch 'master' into wasix 2023-01-30 13:42:11 +01:00
Felix Schütt
61059a746f Change order of iterating to prefer -headless library when linking 2023-01-30 09:45:13 +01:00
Felix Schütt
0dbf1126c6 Switch back to wasmer-headless 2023-01-30 08:19:57 +01:00
Christoph Herzog
42f58d0c98 Merge remote-tracking branch 'origin/master' into wasix 2023-01-28 08:30:02 +01:00
Felix Schütt
6ef51c7e09 Fix make lint 2023-01-27 10:00:10 +01:00
Felix Schütt
3ea338c0e5 Link with libwasmer-headless 2023-01-27 09:40:05 +01:00
Felix Schütt
e3db893dd9 Merge branch 'master' into fix-caching-issue-customlambda 2023-01-26 10:53:12 +01:00
Christoph Herzog
f5cfb59090 chore: Update comment to reflect implementation changes
Because an outdated comment is the worst kind of comment.
2023-01-24 20:24:34 +01:00
Christoph Herzog
d1bae195b3 Merge remote-tracking branch 'origin/master' into wasix 2023-01-23 22:00:16 +01:00
Felix Schütt
6d539e0044 Print warning when the libwasmer path might be wrong 2023-01-23 16:55:59 +01:00
Felix Schütt
4b9389cdaa Release 3.2.0-alpha.1 2023-01-23 12:52:43 +01:00
Felix Schütt
ca4b9762f5 Normalize file paths when unpacking .tar.gz on Windows 2023-01-23 10:10:51 +01:00
Felix Schütt
f201f5c670 nit: GIT_HASH_SHORT should show 7 chars, not 5 2023-01-20 17:44:13 +01:00
Felix Schütt
ff11cbd705 Make CompilerOptions flags private again 2023-01-19 19:59:03 +01:00
Felix Schütt
54f0f0cbe9 Undo Store::new_with_tunables debugging code 2023-01-19 19:45:14 +01:00
Felix Schütt
b26b48794c Move get_module_info into the Engine 2023-01-19 19:43:01 +01:00
Felix Schütt
32b39e80ef Remove unnecessary printlns 2023-01-19 19:13:28 +01:00