WebAssembly: add WASIP1 runtime configuration examples

This change adds a "WASIP1 Runtime Configuration" section to the
WebAssembly page.

It provides configuration examples for Wasmtime, Wazero, and Node.js
to properly map the host directory to the guest root `/` and set `PWD`.

Without this configuration, Go programs compiled for `wasip1` often
fail with "Bad file number" errors instead of the expected
`fs.ErrNotExist` when accessing non-existent files or calling
`os.Getwd()`.

For golang/go#60732

Change-Id: I81b328fdf01e45912140848cd7e6cc7299865f04
GitHub-Last-Rev: 3775150fd6a4b82a7ce54ca0416145a2f29c7740
GitHub-Pull-Request: golang/wiki#75
Reviewed-on: https://go-review.googlesource.com/c/wiki/+/727580
Reviewed-by: Sean Liao <sean@liao.dev>
1 file changed
tree: 2faae37df5afb683101718afc2430790d5487883
  1. images/
  2. .gitignore
  3. AI.md
  4. All.md
  5. Articles.md
  6. AssemblyPolicy.md
  7. AVX512.md
  8. Benchmarks.md
  9. Blogs.md
  10. Books.md
  11. BoundingResourceUse.md
  12. cgo.md
  13. ChromeOS.md
  14. codereview.cfg
  15. CodeReview.md
  16. CodeReviewComments.md
  17. CodeReviewConcurrency.md
  18. CodeTools.md
  19. Comments.md
  20. CommitMessage.md
  21. CommonMistakes.md
  22. CompilerOptimizations.md
  23. Conferences.md
  24. Configuring-GoLand-for-WebAssembly.md
  25. Contributing-to-gopls.md
  26. Contributing.md
  27. CoreDumpDebugging.md
  28. Courses.md
  29. CreatingSubRepository.md
  30. CSSStyleGuide.md
  31. CustomPprofProfiles.md
  32. Darwin.md
  33. DashboardBuilders.md
  34. default.tmpl
  35. Deprecated.md
  36. DesignDocuments.md
  37. Diagnostics.md
  38. Download-build-farm-failed-logs-and-debugging.md
  39. DragonFly-BSD.md
  40. Errors.md
  41. ErrorValueFAQ.md
  42. ExperienceReports.md
  43. FileTreeDocumentation.md
  44. FreeBSD.md
  45. FromXToGo.md
  46. Frozen.md
  47. Fuzzing-trophy-case.md
  48. Gardening.md
  49. GccgoCrossCompilation.md
  50. GcToolchainTricks.md
  51. GerritAccess.md
  52. GerritBot.md
  53. GitHubAccess.md
  54. Go-1.10-Release-Party.md
  55. Go-1.6-release-party.md
  56. Go-1.8-Release-Party.md
  57. Go-Community-Slides.md
  58. Go-Release-Cycle.md
  59. Go123Timer.md
  60. Go2.md
  61. Go2ErrorHandlingFeedback.md
  62. Go2ErrorValuesFeedback.md
  63. Go2GenericsFeedback.md
  64. GoArm.md
  65. GoForCPPProgrammers.md
  66. GoGenerateTools.md
  67. GoGetProxyConfig.md
  68. GoGetTools.md
  69. golang-tools.md
  70. GoMips.md
  71. Gomote.md
  72. GOPATH.md
  73. Gopher.md
  74. gopherbot.md
  75. gopls-integrator-FAQ.md
  76. gopls.md
  77. GoStrings.md
  78. GoTalks.md
  79. GoUserGroups.md
  80. GoUsers.md
  81. HandlingIssues.md
  82. heapdump13.md
  83. heapdump14.md
  84. heapdump15-through-heapdump17.md
  85. heapdump15.md
  86. Home.md
  87. HostedContinuousIntegration.md
  88. How-to-ask-for-help.md
  89. HowToAsk.md
  90. IDEsAndTextEditorPlugins.md
  91. index.md
  92. InstallFromSource.md
  93. InstallTroubleshooting.md
  94. InterfaceSlice.md
  95. InvalidFlag.md
  96. Iota.md
  97. Learn.md
  98. LearnConcurrency.md
  99. LearnErrorHandling.md
  100. LearnServerProgramming.md
  101. LearnTesting.md
  102. Linux.md
  103. LinuxKernelSignalVectorBug.md
  104. Livestreams.md
  105. LockOSThread.md
  106. LoopvarExperiment.md
  107. LUCI.md
  108. MacOS12BSDThreadRegisterIssue.md
  109. MethodSets.md
  110. MinimumRequirements.md
  111. MinorReleases.md
  112. Mobile.md
  113. Modules.md
  114. MutexOrChannel.md
  115. nav.yaml
  116. NetBSD.md
  117. NewSpeakers.md
  118. NonEnglish.md
  119. NoPlusOne.md
  120. OpenBSD.md
  121. PackagePublishing.md
  122. PanicAndRecover.md
  123. Performance.md
  124. PerformanceMonitoring.md
  125. PGO-Tools.md
  126. Plan9.md
  127. Podcasts.md
  128. PortingPolicy.md
  129. PriorDiscussion.md
  130. Projects.md
  131. Proposals.md
  132. ProviderIntegration.md
  133. Questions.md
  134. Quiet-Weeks.md
  135. Range.md
  136. RangefuncExperiment.md
  137. RateLimiting.md
  138. ResearchPapers.md
  139. Resolving-Problems-From-Modified-Module-Path.md
  140. Resources-for-slog.md
  141. RiskyChanges.md
  142. Screencasts.md
  143. SettingGOPATH.md
  144. SignalHandling.md
  145. SimultaneousAssignment.md
  146. SliceTricks.md
  147. SlowBots.md
  148. Solaris.md
  149. Spectre.md
  150. Spelling.md
  151. SQLDrivers.md
  152. SQLInterface.md
  153. Style.md
  154. SuccessStories.md
  155. Switch.md
  156. TableDrivenTests.md
  157. TargetSpecific.md
  158. TestComments.md
  159. TestFailures.md
  160. Timeouts.md
  161. Training.md
  162. Ubuntu.md
  163. Watchflakes.md
  164. WebAccessibilityResourcesAndTips.md
  165. WebAssembly.md
  166. Well-known-struct-tags.md
  167. WhyGo.md
  168. Windows.md
  169. WindowsBuild.md
  170. WindowsCrossCompiling.md
  171. WindowsDLLs.md
  172. X-Repositories.md