@@ -32,7 +32,8 @@ $ dotnet add package wasmtime
32
32
33
33
## Introduction
34
34
35
- For this introduction, we'll be using a simple WebAssembly module that imports a ` hello ` function and exports a ` run ` function:
35
+ For this introduction, we'll be using a simple WebAssembly module that imports
36
+ a ` hello ` function and exports a ` run ` function:
36
37
37
38
``` wat
38
39
(module
@@ -83,7 +84,8 @@ var run = instance.GetAction("run")!;
83
84
run ();
84
85
```
85
86
86
- An ` Engine ` is created and then a WebAssembly module is loaded from a string in WebAssembly text format.
87
+ An ` Engine ` is created and then a WebAssembly module is loaded from a string in
88
+ WebAssembly text format.
87
89
88
90
A ` Linker ` defines a function called ` hello ` that simply prints a hello message.
89
91
@@ -107,7 +109,8 @@ Use `dotnet` to build the repository:
107
109
$ dotnet build Wasmtime.sln
108
110
```
109
111
110
- This will download the latest development snapshot of Wasmtime for your platform.
112
+ This will download the latest development snapshot of Wasmtime for your
113
+ platform.
111
114
112
115
### Testing
113
116
@@ -128,4 +131,36 @@ $ dotnet pack Wasmtime.sln -c Release /p:Packing=true
128
131
129
132
This will create a ` .nupkg ` file in ` src/bin/Release ` .
130
133
131
- By default, local builds will use a ` -dev ` suffix for the package to differentiate between official packages and development packages.
134
+ By default, local builds will use a ` -dev ` suffix for the package to
135
+ differentiate between official packages and development packages.
136
+
137
+ ### Updating Wasmtime for a release
138
+
139
+ To update the Wasmtime library used for a new release, change ` WasmtimeVersion `
140
+ in ` Directory.Build.props ` :
141
+
142
+ ``` xml
143
+ <WasmtimeVersion Condition =" '$(WasmtimeVersion)'==''" >$VERSION</WasmtimeVersion >
144
+ ```
145
+
146
+ Additionally, edit ` Wasmtime.csproj ` to change the ` PackageReleaseNotes ` to the
147
+ new version:
148
+
149
+ ``` xml
150
+ <PackageReleaseNotes >Update Wasmtime to $VERSION.</PackageReleaseNotes >
151
+ ```
152
+
153
+ ### Publishing the Wasmtime .NET NuGet package
154
+
155
+ GitHub actions is used to automatically publish a package to NuGet when a tag
156
+ is pushed to the repository.
157
+
158
+ To publish a new release, create a release in GitHub and add the relevant
159
+ release notes.
160
+
161
+ Use a tag of the format ` v$VERSION ` where ` $VERSION ` matches the Wasmtime
162
+ version used by the .NET package; ensure the tagged commit matches the last
163
+ commit to make for the release.
164
+
165
+ When the release is published on GitHub, an action should automatically start
166
+ to build and publish the package to NuGet.
0 commit comments