As part of the overall [packaging pipeline](https://github.com/rust-lang-nursery/rust-wasm/blob/master/pipeline.png), we will need a way within Rust to express JS dependencies. This happens in two parts: - [Specifying both module and function names for imports via `extern`](https://github.com/rust-lang-nursery/rust-wasm/issues/29). - Supplying the actual JS to fulfill those imports. This issue is about the second step, supplying the JS. There are at least three sources for the JS imports we want to consider: - Functions expected to already exist on the host. - Functions coming from JS provided directly with the crate. - Functions coming from an npm package. Let's discuss which of these options we want to support, and how to express them on the Rust side.
As part of the overall packaging pipeline, we will need a way within Rust to express JS dependencies. This happens in two parts:
extern.This issue is about the second step, supplying the JS. There are at least three sources for the JS imports we want to consider:
Let's discuss which of these options we want to support, and how to express them on the Rust side.