This is partial work towards including Typescript types for pyproxy.js. Typescript does not understand assignments to `Module`, it wants information to be communicated via `import` and `export`. Therefore, the public functions from `pyproxy.js` that we want type annotations for need to be exported using the `export` keyword. This necessitates switching to importing pyproxy.js via rollup.

There are two commits here, in the first commit I made the manual changes needed preserving indentation in pyproxy.js, and in the second commit I applied the linter to pyproxy.js. Almost every line in pyproxy.js has a change in indentation. These indentation changes are my main motivation for making this into a separate PR.

Currently I apply the macro preprocessor to pyproxy.js with 
```sh
cat $< | $(CC) -E -C -P -imacros src/core/pyproxy.c -o $@ $(MAIN_MODULE_CFLAGS) -
```
As far as I can tell the effect of this is close to identical to what was happening before. In the future, we may consider rearranging things to avoid the need for preprocessing `pyproxy.js` -- it is unusual and has the potential to confuse people.
MAINT Use rollup instead of EM_JS to include pyproxy.js . This is partial work towards including Typescript types for pyproxy.js. Typescript does not understand assignments to `Module`, it wants information to be communicated via `import` and `export`. Therefore, the public functions from `pyproxy.js` that we want type annotations for need to be exported using the `export` keyword. This necessitates switching to importing pyproxy.js via rollup.

There are two commits here, in the first commit I made the manual changes needed preserving indentation in pyproxy.js, and in the second commit I applied the linter to pyproxy.js. Almost every line in pyproxy.js has a change in indentation. These indentation changes are my main motivation for making this into a separate PR.

Currently I apply the macro preprocessor to pyproxy.js with 
```sh
cat $< | $(CC) -E -C -P -imacros src/core/pyproxy.c -o $@ $(MAIN_MODULE_CFLAGS) -
```
As far as I can tell the effect of this is close to identical to what was happening before. In the future, we may consider rearranging things to avoid the need for preprocessing `pyproxy.js` -- it is unusual and has the potential to confuse people.
This patch disables multiprocessing and pthread for blosc
diff --git a/numcodecs/blosc.pyx b/numcodecs/blosc.pyx
index 3bfdc00..c6521b7 100644
--- a/numcodecs/blosc.pyx
+++ b/numcodecs/blosc.pyx
@@ -77,6 +77,8 @@ AUTOBLOCKS = 0
 # synchronization
 try:
     mutex = multiprocessing.Lock()
+except ModuleNotFoundError:
+    mutex = None
 except OSError:
     mutex = None
 
diff --git a/c-blosc/blosc/blosc.h b/c-blosc/blosc/blosc.h
index 40857d0..8a1e969 100644
--- a/c-blosc/blosc/blosc.h
+++ b/c-blosc/blosc/blosc.h
@@ -50,7 +50,7 @@ extern "C" {
   ((INT_MAX - BLOSC_MAX_TYPESIZE * sizeof(int32_t)) / 3)
 
 /* The maximum number of threads (for some static arrays) */
-#define BLOSC_MAX_THREADS 256
+#define BLOSC_MAX_THREADS 1
 
 /* Codes for shuffling (see blosc_compress) */
 #define BLOSC_NOSHUFFLE   0  /* no shuffle */

 diff --git a/c-blosc/blosc/blosc.c b/c-blosc/blosc/blosc.c
index a5a5bd5..2a7797c 100644
--- a/c-blosc/blosc/blosc.c
+++ b/c-blosc/blosc/blosc.c
@@ -2236,6 +2236,7 @@ void blosc_atfork_child(void) {
 
 void blosc_init(void)
 {
+  g_initlib = 1;
   /* Return if we are already initialized */
   if (g_initlib) return;
 



This patch disables multiprocessing and pthread for blosc
diff --git a/numcodecs/blosc.pyx b/numcodecs/blosc.pyx
index 3bfdc00..c6521b7 100644
--- a/numcodecs/blosc.pyx
+++ b/numcodecs/blosc.pyx
@@ -77,6 +77,8 @@ AUTOBLOCKS = 0
 # synchronization
 try:
     mutex = multiprocessing.Lock()
+except ModuleNotFoundError:
+    mutex = None
 except OSError:
     mutex = None
 
diff --git a/c-blosc/blosc/blosc.h b/c-blosc/blosc/blosc.h
index 40857d0..8a1e969 100644
--- a/c-blosc/blosc/blosc.h
+++ b/c-blosc/blosc/blosc.h
@@ -50,7 +50,7 @@ extern "C" {
   ((INT_MAX - BLOSC_MAX_TYPESIZE * sizeof(int32_t)) / 3)
 
 /* The maximum number of threads (for some static arrays) */
-#define BLOSC_MAX_THREADS 256
+#define BLOSC_MAX_THREADS 1
 
 /* Codes for shuffling (see blosc_compress) */
 #define BLOSC_NOSHUFFLE   0  /* no shuffle */

 diff --git a/c-blosc/blosc/blosc.c b/c-blosc/blosc/blosc.c
index a5a5bd5..2a7797c 100644
--- a/c-blosc/blosc/blosc.c
+++ b/c-blosc/blosc/blosc.c
@@ -2236,6 +2236,7 @@ void blosc_atfork_child(void) {
 
 void blosc_init(void)
 {
+  g_initlib = 1;
   /* Return if we are already initialized */
   if (g_initlib) return;
 


