Skip to content

Commit

Permalink
more readme
Browse files Browse the repository at this point in the history
  • Loading branch information
konsumer committed Oct 30, 2024
1 parent 065bf0e commit 99f74eb
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,38 @@

A working, zero-dependency browser-shim (and general js engine) for WASI preview1, with lots of filesystem options. It will work in places other than a browser, but that is the primary target. It's easy, light, simple, easy to modify, and should work with any WASI-enabled wasm.

## install

Install into your bundled project with `npm i easywasi`. You can also use it on the web, directly from cdn:

```html
<script type="module">
import WasiPreview1 from 'https://esm.sh/[email protected]'
</script>
```

And I like to use sourcemaps:
```html
<script type="importmap">
{
"imports": {
"easywasi": "https://esm.sh/[email protected]",
"@zenfs/core": "https://esm.sh/@zenfs/core",
"@zenfs/dom": "https://esm.sh/@zenfs/dom",
"@zenfs/zip": "https://esm.sh/@zenfs/zip"
}
}
</script>
<script type="module">
import { WasiPreview1 } from 'easywasi'
import { configure, InMemory, fs } from '@zenfs/core'
import { IndexedDB } from '@zenfs/dom'
import { Zip } from '@zenfs/zip'
</script>
```


## usage

You can use it without a filesystem, like this:
Expand Down

0 comments on commit 99f74eb

Please sign in to comment.