Skip to content

📝Ensure example deploy required file for local execution#311

Merged
martindevans merged 5 commits into
bytecodealliance:mainfrom
fforjan:feature/fixDeploymentForExample
Jun 13, 2026
Merged

📝Ensure example deploy required file for local execution#311
martindevans merged 5 commits into
bytecodealliance:mainfrom
fforjan:feature/fixDeploymentForExample

Conversation

@fforjan

@fforjan fforjan commented Jun 4, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@fforjan

fforjan commented Jul 1, 2024

Copy link
Copy Markdown
Contributor Author

@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

fforjan commented Jul 1, 2024

Copy link
Copy Markdown
Contributor Author

if I was trying to debug from visual studio :
image

@fforjan

fforjan commented Jul 8, 2024

Copy link
Copy Markdown
Contributor Author

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

@jsturtevant

Copy link
Copy Markdown
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

fforjan commented Sep 10, 2024

Copy link
Copy Markdown
Contributor Author

@jsturtevant any update ?

@fforjan

fforjan commented May 10, 2026

Copy link
Copy Markdown
Contributor Author

@martindevans the unit test do not pass, but I do not think this is related tothis cbranch ?

@martindevans

Copy link
Copy Markdown
Member

Yeah I think it's unrelated to these changes. I'll find some time to investigate it in more detail soon.

@martindevans

Copy link
Copy Markdown
Member

Hopefully #361 resolves the test issues.

@fforjan

fforjan commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

@martindevans just waiting for it to be completed !

@martindevans

Copy link
Copy Markdown
Member

Thanks for fixing this, and sorry for the long delay on getting it merged!

@martindevans martindevans merged commit cff9325 into bytecodealliance:main Jun 13, 2026
6 checks passed
Avril112113 pushed a commit to Avril112113/wasmtime-dotnet that referenced this pull request Jun 16, 2026
…iance#311)

Co-authored-by: Frédéric Forjan <frederic.forjan@aveva.com>
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.

4 participants