Commit Graph
100 Commits
Author SHA1 Message Date
YAMAMOTO TakashiandGitHub fde98331ff examples/terminate: Use wasm_runtime_spawn_exec_env as well (#3049) 2024-01-18 20:44:09 +08:00
YAMAMOTO TakashiandGitHub b97370e3a8 samples/terminate: Add a sample to demonstrate wasm_runtime_terminate (#3043)
This is basically a modified copy of the "shared-module" example.
2024-01-18 15:01:03 +08:00
YAMAMOTO TakashiandGitHub d13a54f860 Revert "Enable MAP_32BIT for macOS (#2992)" (#3032)
Revert "Do not use pagezero size option if osx version >= 13 (#3025)"
and  "Enable MAP_32BIT for macOS (#2992)".

Discussion: https://github.com/bytecodealliance/wasm-micro-runtime/issues/3009
2024-01-18 09:22:09 +08:00
YAMAMOTO TakashiandGitHub 685d55d2e7 nuttx: Use larger alignment for os_mmap and comment why (#3017)
Other platforms with malloc-based os_mmap might need similar changes
too, depending on their target cpu arch.
2024-01-16 09:17:58 +08:00
YAMAMOTO TakashiandGitHub 837b9904f5 aot debug: Try to use a bit more appropriate file names (#3000)
When the original wasm contains multiple compilation units, the current
logic uses the first one for everything. This commit tries to use a bit more
appropriate ones.
2024-01-15 15:02:12 +08:00
YAMAMOTO TakashiandGitHub 08442458b1 aot debug: Update DW_AT_producer (#3001)
Currently we are using "ant compiler", which is a bit historical.
This commit changes it to use "WAMR AoT compiler" instead.
2024-01-12 13:43:18 +08:00
YAMAMOTO TakashiandGitHub 6fa6d6d9a5 Enable MAP_32BIT for macOS (#2992)
On macOS, by default, the first 4GB is occupied by the pagezero.
While it can be controlled with link time options, as we are
an library, we usually don't have a control on how to link an
executable.
2024-01-10 16:19:06 +08:00
YAMAMOTO TakashiandGitHub 49ac1e0636 doc/build_wasm_app.md: Add a note about aot abi compatibility (#2993) 2024-01-10 12:10:40 +08:00
YAMAMOTO TakashiandGitHub 722381fcf2 aot compiler: Some updates for LLVM 18 (#2981)
Note: This commit includes copy-and-paste from LLVM and thus adds
the LLVM copyright notice.

cf. https://github.com/llvm/llvm-project/commit/0a1aa6cda2758b0926a95f87d39ffefb1cb90200
cf. https://github.com/llvm/llvm-project/commit/a1e9777b760fbd4428073fd7b0fc8bea15bd2183
cf. https://github.com/llvm/llvm-project/commit/56c72c7f339cd6ff780a0d6aa1a0ac8bfc1487aa
2024-01-08 10:15:31 +08:00
YAMAMOTO TakashiandGitHub 5edd85d055 doc: Separate source_debugging.md into two files (#2932)
The original file was confusing as it contains both of
interpreter and aot debugging information intermixed.
2023-12-27 15:51:51 +08:00
YAMAMOTO TakashiandGitHub 8318333304 nuttx: Add CONFIG_INTERPRETERS_WAMR_DEBUG_AOT (#2929)
At least it's sometimes useful for nuttx sim.

eg. (modified a bit to avoid github autolinks)
```
spacetanuki% lldb ./nuttx
(lldb) target create "./nuttx"
Current executable set to '/Users/yamamoto/git/nuttx/nuttx/nuttx' (x86_64).
(lldb) settings set plugin.jit-loader.gdb.enable on
(lldb) b foo
Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) r
Process 37011 launched: '/Users/yamamoto/git/nuttx/nuttx/nuttx' (x86_64)

NuttShell (NSH) NuttX-10.4.0
nsh> mount -t hostfs -o fs=/tmp/wasm /mnt
nsh> iwasm /mnt/test.aot
1 location added to breakpoint 1
Process 37011 stopped
* thread #_1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #_0: 0x0000000105800673 JIT(0x1058002d4)`foo(exenv=0x0000000101284280) at test.c:5
   2
   3    __attribute__((noinline))
   4    void foo()
-> 5    {
   6        printf("hello from %s\n", __func__);
   7    }
   8
Target 0: (nuttx) stopped.
(lldb) bt
* thread #_1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #_0: 0x0000000105800673 JIT(0x1058002d4)`foo(exenv=0x0000000101284280) at test.c:5
    frame #_1: 0x000000010580077a JIT(0x1058002d4)`bar(exenv=0x0000000101284280) at test.c:12:2
    frame #_2: 0x000000010580086a JIT(0x1058002d4)`baz(exenv=0x0000000101284280) at test.c:19:2
    frame #_3: 0x0000000105800972 JIT(0x1058002d4)`__main_argc_argv(exenv=<unavailable>, argc=<unavailable>, argv=<unavailable>) at test.c:26:3
    frame #_4: 0x00000001058061aa JIT(0x1058002d4)`aot_func#14 + 278
    ...
```
2023-12-26 16:56:34 +08:00
YAMAMOTO TakashiandGitHub 18529253d8 interpreter: Simplify memory.grow a bit (#2899) 2023-12-12 20:24:51 +08:00
YAMAMOTO TakashiandGitHub 1dbae404b4 samples/spawn-thread: Tweak to expose a bug (#2888)
this would expose the deadlock bug, which has been fixed by
https://github.com/bytecodealliance/wasm-micro-runtime/pull/2882
2023-12-08 18:35:40 +08:00
YAMAMOTO TakashiandGitHub 9c3581c179 samples/spawn-thread: Disable libc and pthread (#2883)
because this sample doesn't really require them.
2023-12-08 18:12:37 +08:00
YAMAMOTO TakashiandGitHub 73914caa9b core/iwasm/interpreter/wasm_loader.c: remove an extra validation (#2845)
* Empty names are spec-wise valid.
* As we ignore unknown custom sections anyway, it's safe to
  accept empty names here.
* Currently, the problem is not exposed on our CI because
   the wabt version used there is a bit old.
2023-12-01 18:29:15 +08:00
YAMAMOTO TakashiandGitHub fbd9a760e7 test_wamr.sh: Don't bother to build shared library (#2844)
This script only uses the iwasm command.
2023-12-01 18:12:55 +08:00
YAMAMOTO TakashiandGitHub 562a5dd1b6 Fix data/elem drop (#2747)
Currently, `data.drop` instruction is implemented by directly modifying the
underlying module. It breaks use cases where you have multiple instances
sharing a single loaded module. `elem.drop` has the same problem too.

This PR  fixes the issue by keeping track of which data/elem segments have
been dropped by using bitmaps for each module instances separately, and
add a sample to demonstrate the issue and make the CI run it.

Also add a missing check of dropped elements to the fast-jit `table.init`.

Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2735
Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2772
2023-11-18 08:50:16 +08:00
YAMAMOTO TakashiandGitHub 2d0d4a0be9 Remove unused JitBitmap (#2775)
Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2754
2023-11-16 18:48:06 +08:00
YAMAMOTO TakashiandGitHub 24c4d256b3 Grab cluster->lock when modifying exec_env->module_inst (#2685)
Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2680

And when switching back to the original module_inst, propagate exception if any.

cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/2512
2023-11-09 18:56:02 +08:00
YAMAMOTO TakashiandGitHub 9a5c777aff Revert "Strip static and shared libraries of iwasm to reduce the binary size (#2431)" (#2669)
This reverts commit 7e3a29d5e4:
* it doesn't work for macOS. ("unrecognized option: --strip-all")
* it doesn't work for ubuntu.
  https://github.com/bytecodealliance/wasm-micro-runtime/issues/2665
2023-10-25 20:46:49 +08:00
YAMAMOTO TakashiandGitHub e1ea15d94e aot_resolve_stack_sizes: Disable the size check for now (#2608)
cf.
https://github.com/bytecodealliance/wasm-micro-runtime/issues/2555#issuecomment-1738530877
https://github.com/llvm/llvm-project/issues/67765
2023-09-29 15:30:52 +08:00
YAMAMOTO TakashiandGitHub ac6435884f doc/memory_tune.md: "remove malloc" hack is not relevant to wasi-threads (#2603) 2023-09-28 09:27:33 +08:00
YAMAMOTO TakashiandGitHub b622622096 samples/inst-context-threads: Add a brief explanation (#2592) 2023-09-26 10:00:33 +08:00
YAMAMOTO TakashiandGitHub 94f276eab0 test_wamr.sh: Bump wasi-testsuite version (#2568)
On posix-like platforms, the rest of wasi-threads tests
should pass after the recent changes including the following PRs:
#2516, #2524, #2529, #2571, #2576 and #2582.
2023-09-26 09:20:13 +08:00
YAMAMOTO TakashiandGitHub 363f08975b Fix a few issues in "run_wasi_tests.sh: provide stdin by ourselves" (#2582)
Apply "provide stdin by ourselves" to the aot case and check the correct exit code.
2023-09-23 10:28:18 +08:00
YAMAMOTO TakashiandGitHub 0677288f22 run_wasi_tests.sh: Provide stdin by ourselves (#2576)
This improves test consistency between typical local environments and
github runners.

This is necessary for some of latest wasi-threads tests.

cf. https://github.com/yamt/toywasm/commit/570e6706312cbdccb9d5268347186b441a24444b
2023-09-22 08:57:48 +08:00
YAMAMOTO TakashiandGitHub cf97ee081f test_wamr.sh: Print a bit more meaningful message (#2574) 2023-09-21 18:39:12 +08:00
YAMAMOTO TakashiandGitHub c7a7db21b7 export_native_api.md: Add a note about thread termination (#2572) 2023-09-21 13:32:08 +08:00
YAMAMOTO TakashiandGitHub 6fca48d8e6 Fix inverted WASM_DISABLE_WAKEUP_BLOCKING_OP checks (#2571) 2023-09-21 11:56:21 +08:00
YAMAMOTO TakashiandGitHub 444b159963 Implement async termination of blocking thread (#2516)
Send a signal whose handler is no-op to a blocking thread to wake up
the blocking syscall with either EINTR equivalent or partial success.

Unlike the approach taken in the `dev/interrupt_block_insn` branch (that is,
signal + longjmp similarly to `OS_ENABLE_HW_BOUND_CHECK`), this PR
does not use longjmp because:
* longjmp from signal handler doesn't work on nuttx
  refer to https://github.com/apache/nuttx/issues/10326
* the singal+longjmp approach may be too difficult for average programmers
  who might implement host functions to deal with

See also https://github.com/bytecodealliance/wasm-micro-runtime/issues/1910
2023-09-20 18:11:52 +08:00
YAMAMOTO TakashiandGitHub 9c34fc3514 Fix build with ancient GCC (4.8) (#2553)
Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2552
2023-09-15 16:24:12 +08:00
YAMAMOTO TakashiandGitHub a6fda9b7ab Add an API to terminate instance (#2538)
Add API wasm_runtime_terminate to terminate a module instance
by setting "terminated by user" exception to the module instance.

And update the product-mini of posix platforms.

Note: this doesn't work for some situations like blocking system calls.
2023-09-13 17:09:31 +08:00
YAMAMOTO TakashiandGitHub f128150d43 fd_object_release: Preserve errno (#2535)
Preserve errno because this function is often used like
the following. The caller wants to report the error from the main
operation (`lseek` in this example), not from fd_object_release.

```
    off_t ret = lseek(fd_number(fo), offset, nwhence);
    fd_object_release(fo);
    if (ret < 0)
        return convert_errno(errno);
```
2023-09-08 12:26:32 +08:00
YAMAMOTO TakashiandGitHub 534a8cf9f4 Handle a return from wasi _start function correctly (#2529)
This fixes a few test cases in wasi-threads testsuite like wasi_threads_return_main_block.
And also move the special handling for "wasi proc exit" to a more appropriate place.
2023-09-08 11:49:04 +08:00
YAMAMOTO TakashiandGitHub 6c846acc59 Implement module instance context APIs (#2436)
Introduce module instance context APIs which can set one or more contexts created
by the embedder for a wasm module instance:
```C
    wasm_runtime_create_context_key
    wasm_runtime_destroy_context_key
    wasm_runtime_set_context
    wasm_runtime_set_context_spread
    wasm_runtime_get_context
```

And make libc-wasi use it and set wasi context as the first context bound to the wasm
module instance.

Also add samples.

Refer to https://github.com/bytecodealliance/wasm-micro-runtime/issues/2460.
2023-09-07 14:54:11 +08:00
YAMAMOTO TakashiandGitHub 151dfae49c Unifdef -U WASMTIME_SSP_STATIC_CURFDS (#2533)
The macro WASMTIME_SSP_STATIC_CURFDS isn't used in the source code,
remove the related macro control code.
2023-09-06 15:25:58 +08:00
YAMAMOTO TakashiandGitHub 48b71a05fb libc-wasi: Remove unused code (#2528) 2023-09-04 19:14:56 +08:00
YAMAMOTO TakashiandGitHub 9e3904337e Revert "Return error when exception was raised after main thread finishes" (#2524)
This reverts commit 71d43f3ca1.
2023-09-04 18:01:09 +08:00
YAMAMOTO TakashiandGitHub 2e78230e06 set_exception_visitor: Remove the special case for wasi proc exit (#2525)
While wasi proc exit is not a real trap, what the runtime does on it is mostly same as
real traps. That is, kill the siblings threads and represent the exit/trap as the result of
the "process" to the user api. There seems no reason to distinguish it from real traps
here.

Note that:
- The target thread either doesn't care the specific exception type or ignore wasi
  proc exit by themselves. (clear_wasi_proc_exit_exception)
- clear_wasi_proc_exit_exception only clears local exception.
2023-09-04 16:52:19 +08:00
YAMAMOTO TakashiandGitHub 1ff41ebdc2 Implement os_usleep for posix (#2517) 2023-09-01 12:10:54 +08:00
YAMAMOTO TakashiandGitHub 382d52fc05 Stop abusing shared memory lock to protect exception (#2509)
Use a separate global lock instead.

Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2407
2023-08-31 20:39:08 +08:00
YAMAMOTO TakashiandGitHub 0f18051e66 aot: Disable musttail for mips (#2457)
Fixes https://github.com/bytecodealliance/wasm-micro-runtime/issues/2412
2023-08-15 11:15:45 +08:00
YAMAMOTO TakashiandGitHub e360b7a919 wasm_instantiate: Fix a potential integer overflow issue (#2459)
Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2450
2023-08-14 17:27:14 +08:00
YAMAMOTO TakashiandGitHub 5c6613b2b1 Correct --heap-size option in messages (#2458) 2023-08-14 15:12:59 +08:00
YAMAMOTO TakashiandGitHub 5780effc07 iwasm: Fix native lib cleanup after error occurs (#2443)
- If something failed after calling init_native_lib, call deinit_native_lib to clean up.
- Restructure the relevant code for better maintainability.
2023-08-14 14:05:59 +08:00
YAMAMOTO TakashiandGitHub a550f4d9f7 iwasm: call native lib init/deinit if exists (#2439) 2023-08-10 09:26:52 +08:00
YAMAMOTO TakashiandGitHub 51714c41c0 Introduce WASMModuleInstanceExtraCommon (#2429)
Move the common parts of WASMModuleInstanceExtra and
AOTModuleInstanceExtra into the new structure.
2023-08-08 09:35:29 +08:00
YAMAMOTO TakashiandGitHub 91592429f4 Fix memory sharing (#2415)
- Inherit shared memory from the parent instance, instead of
  trying to look it up by the underlying module. The old method
  works correctly only when every cluster uses different module.
- Use reference count in WASMMemoryInstance/AOTMemoryInstance
  to mark whether the memory is shared or not
- Retire WASMSharedMemNode
- For atomic opcode implementations in the interpreters, use
  a global lock for now
- Update the internal API users
  (wasi-threads, lib-pthread, wasm_runtime_spawn_thread)

Fixes https://github.com/bytecodealliance/wasm-micro-runtime/issues/1962
2023-08-04 10:18:13 +08:00
YAMAMOTO TakashiandGitHub bdd99137a4 embed_wamr.md: Improvements about threads (#2420)
- Some more clarifications
- Mention wasi-threads
- Fix a confusing indentation
2023-08-04 09:28:30 +08:00
YAMAMOTO TakashiandGitHub 28125ec538 Move wasm_runtime_destroy_wasi and wasi_nn_destroy calls together (#2418)
And remove obsolete comment.
2023-08-03 08:46:56 +08:00
YAMAMOTO TakashiandGitHub 8518197053 Remove a few unused functions (#2409)
They have been unused since commit 5fc48e3584
2023-07-31 19:14:44 +08:00
YAMAMOTO TakashiandGitHub b1fa27e91d bh_atomic.h: Add BH_ATOMIC_32_FETCH_ADD/BH_ATOMIC_32_FETCH_SUB (#2408) 2023-07-31 17:56:15 +08:00
YAMAMOTO TakashiandGitHub 6d6cea1a73 Fix non-builtin BH_ATOMIC_32_FETCH_OR and BH_ATOMIC_32_FETCH_AND (#2400) 2023-07-30 19:23:30 +08:00
YAMAMOTO TakashiandGitHub 7db4815e83 bh_atomic.h: Add comments (#2398) 2023-07-28 20:36:35 +08:00
YAMAMOTO TakashiandGitHub 228417ab8c Move generic parts of wasm_suspend_flags.h to bh_atomic.h (#2393) 2023-07-27 21:37:23 +08:00
YAMAMOTO TakashiandGitHub 7448a994ed iwasm: Disable app heap by default if wasi is enabled (#2346)
It's rare to require app heap with wasi and sometimes harmful in some cases:
https://github.com/bytecodealliance/wasm-micro-runtime/issues/2275
2023-07-07 16:09:15 +08:00
YAMAMOTO TakashiandGitHub a300b627d5 nuttx: Add a kconfig for wasi-threads (#2343)
nuttx apps counterpart: https://github.com/apache/nuttx-apps/pull/1823
2023-07-07 15:12:00 +08:00
YAMAMOTO TakashiandGitHub 228a3bed53 Fix unused warnings on disable_bounds_checks (#2347) 2023-07-06 15:31:22 +08:00
YAMAMOTO TakashiandGitHub 3bbf59ad45 wamrc: Warn on text relocations for XIP (#2340) 2023-07-05 10:49:45 +08:00
YAMAMOTO TakashiandGitHub 1f89e446d9 Avoid switch lowering to lookup tables for XIP (#2339)
Because it involves relocations for the table. (.Lswitch.table.XXX)

Discussions: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2316
2023-07-04 16:48:32 +08:00
YAMAMOTO TakashiandGitHub c39eb46b6f Add a few more assertions on structures to which aot abi is sensitive (#2326) 2023-06-30 10:22:46 +08:00
YAMAMOTO TakashiandGitHub 03418ef5ac aot: Avoid possible relocations around "stack_sizes" for XIP mode (#2322)
Fixes https://github.com/bytecodealliance/wasm-micro-runtime/issues/2316

Lightly tested on riscv64 qemu.
2023-06-29 18:45:33 +08:00
YAMAMOTO TakashiandGitHub 5c13bbbde7 product-mini/platforms/linux: Mark vmlib POSITION_INDEPENDENT_CODE (#2323)
This fixes armhf build:
https://github.com/bytecodealliance/wasm-micro-runtime/issues/2315

Note: This is not the only place which seems to have the same problem.
For example, many of examples sharing the similar structure probably
have the same problem. This commit leaves them for now.
2023-06-29 14:57:27 +08:00
YAMAMOTO TakashiandGitHub 0a0739ef23 aot: Implement a few more relocation types for riscv (#2318)
This PR partly fixes #2312. Lightly tested on qemu riscv64.
2023-06-27 16:33:05 +08:00
YAMAMOTO TakashiandGitHub 5831531449 aot: Move stack_sizes table to a dedicated section (#2317)
To solve the "AOT module load failed: resolve symbol stack_sizes failed" issue.

This PR partly fixes #2312 and was lightly tested on qemu armhf.
2023-06-27 16:18:14 +08:00
YAMAMOTO TakashiandGitHub cd7941cc39 AOT/JIT native stack bound check improvement (#2244)
Move the native stack overflow check from the caller to the callee because the
former doesn't work for call_indirect and imported functions.

Make the stack usage estimation more accurate. Instead of making a guess from
the number of wasm locals in the function, use the LLVM's idea of the stack size
of each MachineFunction. The former is inaccurate because a) it doesn't reflect
optimization passes, and b) wasm locals are not the only reason to use stack.

To use the post-compilation stack usage information without requiring 2-pass
compilation or machine-code imm rewriting, introduce a global array to store
stack consumption of each functions:
For JIT, use a custom IRCompiler with an extra pass to fill the array.
For AOT, use `clang -fstack-usage` equivalent because we support external llc.

Re-implement function call stack usage estimation to reflect the real calling
conventions better. (aot_estimate_stack_usage_for_function_call)

Re-implement stack estimation logic (--enable-memory-profiling) based on the new
machinery.

Discussions: #2105.
2023-06-22 07:27:07 +08:00
YAMAMOTO TakashiandGitHub 92e073b8ce AOTFuncContext: Remove a stale comment (#2283) 2023-06-09 22:31:08 +08:00
YAMAMOTO TakashiandGitHub 4fcc056178 Fix a heap corruption bug in ems realloc (#2279) 2023-06-09 21:36:00 +08:00
YAMAMOTO TakashiandGitHub cabcb177c8 dwarf_extractor: Constify a bit (#2278) 2023-06-09 09:52:03 +08:00
YAMAMOTO TakashiandGitHub bd96696236 Appease unused warning on min_uint64 (#2277) 2023-06-09 08:40:21 +08:00
YAMAMOTO TakashiandGitHub ce6d1fd8fe wamrc: Add an incompatibility note in the help message (#2276)
An example of such optimizations:
https://github.com/bytecodealliance/wasm-micro-runtime/pull/1752
2023-06-09 08:12:34 +08:00
YAMAMOTO TakashiandGitHub 674f229eff spec-test-script: Disable conversions.wast on i386 (#2269) 2023-06-07 13:23:42 +08:00
YAMAMOTO TakashiandGitHub 59e18ca3c0 Make hmu_tree_node 4 byte aligned to reduce compiler warning (#2268) 2023-06-07 13:02:55 +08:00
YAMAMOTO TakashiandGitHub 6e3c3fe9ec Fix build error with LLVM 16 (#2259) 2023-06-06 13:45:18 +08:00
YAMAMOTO TakashiandGitHub 5d69f364db aot/jit: Set module layout (#2260)
LLVM 15 and later sometimes perform wrong optimizations without this.
2023-06-06 10:18:16 +08:00
YAMAMOTO TakashiandGitHub 94204b90ad aot_compile_op_call: Remove a wrong optimization (#2233)
Unlike a tail-call, the caller of an ordinary recursive call doesn't
necessarily return immediately.
2023-05-25 07:44:54 +08:00
YAMAMOTO TakashiandGitHub 670567f8b3 core/iwasm/compilation: constify a bit (#2223)
Just to make the code a bit easier to read.
2023-05-20 11:55:02 +08:00
YAMAMOTO TakashiandGitHub f759a1f960 A few changes related to WAMRC_LLC_COMPILER (#2218)
Print `target triple` for wamrc and set target triple for the LLVM module.
And update document.
2023-05-17 09:56:35 +08:00
YAMAMOTO TakashiandGitHub 2b896c80ef wamrc: Add --stack-usage option (#2158) 2023-04-28 13:56:44 +08:00
YAMAMOTO TakashiandGitHub 8abb153546 VSCode-Extension: Download lldb built for ubuntu 20.04 (#2139)
This should allow users to use the vscode extension on ubuntu 20.04.

After https://github.com/bytecodealliance/wasm-micro-runtime/pull/2132 ,
our lldb binary for 20.04 works on ubuntu 22.04 as well.

On the other hand, lldb for 22.04 has no chance to work on ubuntu 20.04.
(because of glibc version requirement.)
2023-04-23 14:33:52 +08:00
YAMAMOTO TakashiandGitHub dfca21d239 build_wamr_vscode_ext.yml: vsce publish only on the official repo (#2130)
This makes it simpler to test workflow files on a fork.
2023-04-19 19:39:01 +08:00
YAMAMOTO TakashiandGitHub 0158eea965 build_wamr_lldb.yml: sync lldb build options between ubuntu and macos (#2132)
Notably, this disables python scripting support on ubuntu:

* It isn't necessary for the primary purpose of this build. (that is, the vscode extension)
* It has been disabled in the macOS counterpart.
* It allows to use the same binary for 22.04 and 20.04. (note: 22.04 and 20.04 provide different versions of libpython)
2023-04-19 14:01:48 +08:00
YAMAMOTO TakashiandGitHub dac86af2f2 Update messages/comments to refer the new place of the version definition (#2133) 2023-04-18 21:09:18 +08:00
YAMAMOTO TakashiandGitHub e7b988e6ab Document the summary of two pthread implementations (#2104)
And add `wasi-threads` to the key feature list in README.md.
2023-04-04 17:22:54 +08:00
YAMAMOTO TakashiandGitHub 9f0c4b63ac doc/memory_usage.md: Update after dev/wasi_threads merge (#1994) 2023-03-01 05:19:34 +08:00
YAMAMOTO TakashiandGitHub bb5629811f language-bindings/python/wamr-api: Fix a sample (#1977) 2023-02-21 18:36:03 +08:00
YAMAMOTO TakashiandGitHub d8c333f32c Fix wamrapi python binding for darwin (#1978) 2023-02-21 18:35:15 +08:00
YAMAMOTO TakashiandGitHub 37b09d0f24 Expose wasm_runtime_call_indirect (#1969)
The function has been there for long. While what it does look a bit unsafe
as it calls a function which may be not wasm-wise exported explicitly, it's
useful and widely used when implementing callback-taking APIs, including
our pthread_create's implementation.
2023-02-20 18:56:55 +08:00
YAMAMOTO TakashiandGitHub ee1871d3f8 Enable iwasm --max-threads option for wasi-threads as well (#1939) 2023-02-07 13:46:41 +08:00
YAMAMOTO TakashiandGitHub aab875b91f wamr-compiler: enable wasi-threads (#1938)
cf. https://github.com/bytecodealliance/wasm-micro-runtime/pull/1893
2023-02-07 12:34:33 +08:00
YAMAMOTO TakashiandGitHub 7d3b2a8773 Make memory profiling show native stack usage (#1917) 2023-02-01 11:52:15 +08:00
YAMAMOTO TakashiandGitHub 42f8fed20e Rename thread_spawn import (#1907)
Following the wit-defined ABI:
https://github.com/WebAssembly/wasi-threads/pull/26

cf. https://github.com/WebAssembly/wasi-libc/pull/387
2023-01-27 06:45:34 +08:00
YAMAMOTO TakashiandGitHub 5f0f8fe7ee Relax wasi memory export check when wasi-threads is enabled (#1893)
https://github.com/WebAssembly/wasi-threads/issues/22
https://github.com/WebAssembly/WASI/issues/502
2023-01-16 20:21:51 +08:00
YAMAMOTO TakashiandGitHub 21ba730de3 Document some info about estimating memory usage (#1879)
Only covers limited configurations
2023-01-12 19:04:20 +08:00
YAMAMOTO TakashiandGitHub d04f3988c3 libc-wasi: Fix spurious poll timeout (#1824)
This reverts the "Fix libc-wasi poll_oneoff hang issue" change.
https://github.com/bytecodealliance/wasm-micro-runtime/pull/1300
2022-12-21 17:29:29 +08:00
YAMAMOTO TakashiandGitHub 822a8a5e66 wasm_native.c: Fix build with certain combinations of options (#1778)
Fix a regression in https://github.com/bytecodealliance/wasm-micro-runtime/pull/1756
2022-12-02 11:41:40 +08:00
YAMAMOTO TakashiandGitHub 1032aac60b Add wasm_runtime_get_wasi_exit_code (#1748)
Refer to https://github.com/bytecodealliance/wasm-micro-runtime/issues/1738
2022-11-24 20:26:18 +08:00
YAMAMOTO TakashiandGitHub ff4ee4a95f Add comments around wasm_runtime_set_wasi_args (#1692) 2022-11-09 17:18:22 +08:00
YAMAMOTO TakashiandGitHub 825544ddab samples/native-lib: use the same shared lib name as product-mini (#1669)
Use the shared lib name `libiwasm` instead of static lib name `vmlib`
2022-11-01 21:55:43 +08:00
YAMAMOTO TakashiandGitHub 960b613d10 samples/native-lib: Add an example to use wamr API from native lib (#1649)
Real world native libs likely need to access the wasm_runtime_xxx API.
This example demonstrates it.

Build vmlib as a shared lib to make it straightforward to share a
single runtime instance between iwasm and native libs.
2022-10-28 19:31:21 +08:00