question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Imported Functions with a Void return type

See original GitHub issue

Are imported functions (FunctionImport) with a void return type supported by DNWASM?

I was trying to load a fairly simple wasm file that relied on function import, whose expected signature type matches (type $t1 (func (param i32))).

I provided my .NET-defined function using various forms but they all produced errors, her are a couple of the obvious ones:

My Func Error
public static void foo(int c) Parameter name: Return type System.Void is not compatible with WebAssembly.
public static int foo(int c) Unhandled Exception: WebAssembly.CompilerException: env::putc_js did not match the required type signature.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
RyanLamanskycommented, Aug 5, 2018

You’re welcome to write up a new issue for every different problem you encounter.

This project has struggled with a lack of low-complexity WASM files to test against. I’m happy you pointed out WebAssembly Studio, which I wasn’t previously aware of. It seems like a great resource to resolve that limitation.

1reaction
RyanLamanskycommented, Aug 4, 2018

This should be fixed with 0.3.3-preview.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A function whose declared type is neither 'void' nor 'any' ...
You've declared ISignInData as the return type. But the method doesn't return anything. Just change it to void if you don't plan on...
Read more >
Documentation - More on Functions
Function Type Expressions ... The syntax (a: string) => void means “a function with one parameter, named a , of type string ,...
Read more >
Void Type in Java
Since JDK 1.1, Java provides us with the Void type. Its purpose is simply to represent the void return type as a class...
Read more >
How to Import Some (void *) Returning Type Function into ...
I created a C# console project that will use the C++ function. I know that there will be some void * variable passing,...
Read more >
Functions with (non-void) Return Types
In functions that have non-void return types (dont worry, ... This little program starts out with the import statement and the main function....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found