Thanks for your answer.
1 Mayıs 2019 Çarşamba 23:39:51 UTC+3 tarihinde Brion Vibber yazdı:
>
> On Wed, May 1, 2019 at 12:00 PM Jack Dale > wrote:
>
>> Which type of webhosting do I need to run an Emscripten project, what are
>> the requirements?
>>
>
> Most web hosting should work as long as
PS: I've been looking around a bit, and maybe this is the better solution
(via __attribute__(...)):
__attribute__((visibility("default"))) void foo(void);
This should be the clang equivalent to __declspec(dllimport) in the Visual
Studio compiler, see here:
Thanks, your new idea works for me. the motivation of doing this is that
I will call this imported function while I will insert some wasm code to
the original wasm file later, similar to this project had done
https://github.com/ewasm/wasm-metering , but by a different PL. so I don't
want the
Ah ok, I misunderstood your question, apologies. I don't know how one would
add a function declaration to the WASM imports table like this.
EMSCRIPTEN_KEEPALIVE and the "-s EXPORTED_FUNCTIONS" linker option would
work for the "other side" (some WASM module exporting functions to the
outside).
Thanks, Floh. it works when the function is defined.
Actually, my function is an external function declaration, like
extern "C" void foo();
It doesn't work even I declare like this:
extern "C" void EMSCRIPTEN_KEEPALIVE foo().
Do you have any idea for this situation?
Floh 于2019年5月2日周四
If you don't need the fopen/fread/fclose functions, the easiest way to load
data on demand is emscripten_async_wget_data():
https://emscripten.org/docs/api_reference/emscripten.h.html#c.emscripten_async_wget_data
...this performs a XmlHttpRequest and on success invokes a callback
function
Have a look at EMSCRIPTEN_KEEPALIVE:
https://emscripten.org/docs/api_reference/emscripten.h.html#c.EMSCRIPTEN_KEEPALIVE,
this prevents a C/C++ function from being removed even when it isn't
referenced by other C/C++ code (normally this is used to call C functions
from the JS side).
On
Assuming you don't need the entire file at the same time in memory, I would
allocate a fixed size memory block (let's say a couple of megabytes), and
in a loop, perform "HTTP range requests" into this fixed buffer until the
whole file has been processed.
The emscripten fetch API seems to have
On Thursday, 2 May 2019 01:52:21 UTC+2, Zajo wrote:
Is there any way to open files hosted on a web server and read them
> synchronously on demand
>
If it helps we lazily load files into Emscripten's MEMFS. For example,
create the in-memory file system with some help from JavaScript:
I declare an external function in C source file, but never used by the
code, then compile it to wasm by EMCC. there is no doubt the external
function will be eliminated by the compiler.
Is there any approach to keep this external function and then be compiled
to an import function in wasm?
The
10 matches
Mail list logo