Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝Ensure example deploy required file for local execution #311

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fforjan
Copy link
Contributor

@fforjan fforjan commented Jun 4, 2024

The different example would work if run via dottest run as the local folder would be the one containing the wat file but if run from the binary folder, it would fail as the file woudl be missing.

This is fixing it.

@jsturtevant
Copy link
Contributor

@fforjan what do you mean by but if run from the binary folder?

@fforjan
Copy link
Contributor Author

fforjan commented Jul 1, 2024

@jsturtevant
Execution with dotnet run :

PS C:\git\wasmtime-dotnet\examples\consumefuel> dotnet run
Added 5000 units of fuel
Called an expensive function which consumed 1000 fuel. 3998 units of fuel remaining.
Called an expensive function which consumed 1000 fuel. 2996 units of fuel remaining.
Called an expensive function which consumed 1000 fuel. 1994 units of fuel remaining.
Called an expensive function which consumed 1000 fuel. 992 units of fuel remaining.
Calling the expensive function one more time, which will throw an exception.
Exception caught with the following message:
error while executing at wasm backtrace:
    0:   0x36 - <unknown>!expensive

Caused by:
    Arithmetic operation resulted in an overflow.

which is expected.

'local execution' :

PS C:\git\wasmtime-dotnet\examples\consumefuel\bin\Debug\net8.0> .\consumefuel.exe
Unhandled exception. System.IO.FileNotFoundException: Could not find file 'C:\git\wasmtime-dotnet\examples\consumefuel\bin\Debug\net8.0\consumefuel.wat'.

the file is missing because not in the active folder ?

@fforjan
Copy link
Contributor Author

fforjan commented Jul 1, 2024

if I was trying to debug from visual studio :
image

@fforjan
Copy link
Contributor Author

fforjan commented Jul 8, 2024

@jsturtevant let me know if you would like me to do anything on this

@jsturtevant
Copy link
Contributor

nothing yet, will get to taking a look at this and a few of the other PRs by end of the week. Thanks for the patience!

@fforjan
Copy link
Contributor Author

fforjan commented Sep 10, 2024

@jsturtevant any update ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants