cargo-web-loader
v0.1.4
Published
In order to use this loader you need to install it by cloning this repository: ``` npm i --save cargo-web-loader ``` and then add it to your webpack config accordingly: ```javascript // Cargo web crate loader { test: /Cargo.toml$/, loaders: [
Downloads
1
Readme
Rust loader for cargo-web/stdweb crates
In order to use this loader you need to install it by cloning this repository:
npm i --save cargo-web-loader
and then add it to your webpack config accordingly:
// Cargo web crate loader
{
test: /Cargo.toml$/,
loaders: [
{
loader: "cargo-web-loader",
options: {
flags: '',
bin: false,
release: true,
verbose: false,
features: ""
}
}],
},
// WebAssembly loader. For testing purposes
{
test: /\.wasm$/,
loader: require.resolve('file-loader'),
options: {
name: 'static/wasm/[name].[hash:8].[ext]'
}
},
Finally you can import/require any Cargo.toml file and use it as documented in the cargo-web project.
Special thanks
Credit goes to dflemstr and his rust-native-wasm-loader which provided the groundwork for this loader.