Alex Crichton b762948456 Implement the local JS snippets RFC
This commit is an implementation of [RFC 6] which enables crates to
inline local JS snippets into the final output artifact of
`wasm-bindgen`. This is accompanied with a few minor breaking changes
which are intended to be relatively minor in practice:

* The `module` attribute disallows paths starting with `./` and `../`.
  It requires paths starting with `/` to actually exist on the filesystem.
* The `--browser` flag no longer emits bundler-compatible code, but
  rather emits an ES module that can be natively loaded into a browser.

Otherwise be sure to check out [the RFC][RFC 6] for more details, and
otherwise this should implement at least the MVP version of the RFC!
Notably at this time JS snippets with `--nodejs` or `--no-modules` are
not supported and will unconditionally generate an error.

[RFC 6]: https://github.com/rustwasm/rfcs/pull/6

Closes #1311
2019-03-05 08:00:47 -08:00

25 lines
811 B
TOML

[package]
name = "wasm-bindgen-macro-support"
version = "0.2.38"
authors = ["The wasm-bindgen Developers"]
license = "MIT/Apache-2.0"
repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/macro-support"
homepage = "https://rustwasm.github.io/wasm-bindgen/"
documentation = "https://docs.rs/wasm-bindgen"
description = """
The part of the implementation of the `#[wasm_bindgen]` attribute that is not in the shared backend crate
"""
edition = '2018'
[features]
spans = ["wasm-bindgen-backend/spans"]
extra-traits = ["syn/extra-traits"]
strict-macro = []
[dependencies]
syn = { version = '0.15.0', features = ['visit'] }
quote = '0.6'
proc-macro2 = "0.4.9"
wasm-bindgen-backend = { path = "../backend", version = "=0.2.38" }
wasm-bindgen-shared = { path = "../shared", version = "=0.2.38" }