Skip to content

Create a project template for writing wasm libraries intended for use by JS #56

Closed
@fitzgen

Description

@fitzgen

It should have

  • the state-of-the-art dependencies already in Cargo.toml
  • extern declarations for those crates already in src/lib.rs
  • #![no_std] declaration
  • panic_fmt handler that doesn't use fmting infrastructure, for small code sizes by default
  • some script or makefile or xargo type thing that does cargo build --release wasm32-unknown-unknown && wasm-gc ... && wasm-opt ...

Open questions:

  • Where should this template live? A new repository?
  • What dependencies should it come with?
    • wasm-bindgen? This seems like a good choice to me.
    • wee_alloc as the global allocator? This is much more opinionated, and is likely not the right choice in many situations, but in the library-for-use-by-JS scenario fairly likely to be a good choice.
    • Other things?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions