github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/fs/rc/js/README.md (about)

     1  # Rclone as WASM
     2  
     3  This directory contains files to use the rclone rc as a library in the browser.
     4  
     5  This works by compiling rclone to WASM and loading that in via javascript.
     6  
     7  This contains the following files
     8  
     9  - `index.html` - test web page to load the module
    10  - `loader.js` - java script to load the module - see here for usage
    11  - `main.go` - main go code exporting the rclone rc
    12  - `Makefile` - test makefile
    13  - `README.md` - this readme
    14  - `serve.go` - test program to serve the web page
    15  - `wasm_exec.js` - interface code from the go source - don't edit
    16  
    17  ## Compiling
    18  
    19  This can be compiled by using `make` or alternatively `GOARCH=wasm GOOS=js go build -o rclone.wasm`
    20  
    21  ## Running
    22  
    23  Run the test server with `make serve` and examine the page at
    24  http://localhost:3000/ - look at the javascript console and look at
    25  the end of `loader.js` for how that works.