Exclosured (exclosured v0.1.4)

Copy Markdown

Exclosured compiles Rust code to WebAssembly and runs it in browser sandboxes with Phoenix LiveView bidirectional communication.

Configuration

config :exclosured,
  source_dir: "native/wasm",
  output_dir: "priv/static/wasm",
  optimize: :none,
  modules: [
    my_mod: [],
    renderer: [canvas: true]
  ]

Summary

Functions

Returns the URL for an asset file associated with a module.

Returns a list of all configured module names.

Returns the URL for a module's wasm-bindgen JS glue file.

Returns the filesystem path to the compiled .wasm file for a module.

Returns the browser-accessible URL path for a module's .wasm file.

Functions

asset_url(module_name, filename)

Returns the URL for an asset file associated with a module.

modules()

Returns a list of all configured module names.

wasm_js_url(module_name)

Returns the URL for a module's wasm-bindgen JS glue file.

wasm_path(module_name)

Returns the filesystem path to the compiled .wasm file for a module.

wasm_url(module_name)

Returns the browser-accessible URL path for a module's .wasm file.