@@ -277,7 +277,7 @@ theory lots of runway for us to figure out something to help us out!
277
277
278
278
I'd hate to leave you with a cliffhanger like this, though! While not all of the
279
279
above questions have great answers today, I've been working on at least a
280
- * functioning* solution to many of the in ` wasm-bindgen ` specifically. Let's take
280
+ * functioning* solution to many of the issues in ` wasm-bindgen ` specifically. Let's take
281
281
a look at that and see if we can actually demo threads and WebAssembly today!
282
282
283
283
### Threads and ` wasm-bindgen `
@@ -303,7 +303,7 @@ questions with this newfound power.
303
303
304
304
#### Injecting thread-local ` global ` s
305
305
306
- Although LLVM/LLD dont 't currently have the ability to emit custom ` global `
306
+ Although LLVM/LLD don 't currently have the ability to emit custom ` global `
307
307
variables, we do in ` wasm-bindgen ` ! This is an easy method to implement
308
308
thread-local storage, so let's have ` wasm-bindgen ` inject two globals:
309
309
@@ -315,7 +315,7 @@ thread-local storage, so let's have `wasm-bindgen` inject two globals:
315
315
2 . Next, a TCB slot. A TCB is a "thread control block" and is typically used to
316
316
store an allocated structure in threading runtimes. This allocated structure
317
317
is an entry point for lots of other runtime-related functionality, but for
318
- now we'll primarily used this as storage for user-defined thread-local
318
+ now we'll primarily use this as storage for user-defined thread-local
319
319
values. Or, in other words, this is how we'll implement [ ` thread_local! ` ] .
320
320
321
321
It's easy enough to add two ` global ` variables of type ` i32 ` to the wasm module,
@@ -359,7 +359,7 @@ these steps:
359
359
360
360
2 . We know we're the first thread (the main thread) if our thread ID is zero.
361
361
This is a great time to initialize memory, so ` wasm-bindgen ` can flag all our
362
- data segments as ` passive ` , and if our ID 0 is 0 we can call ` memory.init ` .
362
+ data segments as ` passive ` , and if our ID is 0 we can call ` memory.init ` .
363
363
364
364
3 . If our thread ID isn't 0, then we know that we're a spawned thread. LLVM
365
365
already arranged for there to be a ` global ` for our stack pointer, but its
@@ -407,7 +407,7 @@ awesome to have a story for bundlers for large-scale integration. Unfortunately
407
407
I ran into a few snags like [ you can't access the
408
408
` WebAssembly.Module ` ] [ webpack-wasm-module ] and it also wasn't clear to me how
409
409
workers would use a different instantiation path that would ` onmessage ` to wait
410
- for the module/memory and the instantiate after receiving. Fear not, though, I'm
410
+ for the module/memory and then instantiate after receiving. Fear not, though, I'm
411
411
sure we'll figure out a bundler story for this one way or another!
412
412
413
413
Next I turned to ` wasm-bindgen ` 's [ ` --no-modules ` ] option to see if something
0 commit comments