rust-3d | 3D/2D library written in Rust | DevOps library
kandi X-RAY | rust-3d Summary
kandi X-RAY | rust-3d Summary
Meant as basis for numeric algorithms, viewers, game engines, ….
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rust-3d
rust-3d Key Features
rust-3d Examples and Code Snippets
Community Discussions
Trending Discussions on rust-3d
QUESTION
As mentioned in the title the cargo build fails to generate the pkg directory. I am following a tutorial where I run the command cargo build --target wasm-unknown-unknown
which runs fine and I get no errors there. Then in my index.js file I would need to import the wasm file with the following statement: import './pkg/rust_3d_demo'
. But there is no pkg directory generated after running the cargo build command. The tutorial is only 3 days old on youtube by Mr Doug Milford so there are no version issues here and my rustc and rustup and cargo are all up to date. Any thoughts on the matter? Much appreciated.
Here is my Cargo.toml file:
...ANSWER
Answered 2019-Dec-31 at 08:39You use wasm-build
via webpack.config.js
this way:
- import the
wasm-pack-plugin
into the config fileconst WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
- add a new instance in the plugins section:
new WasmPackPlugin({ crateDirectory: path.resolve(__dirname, ".") })
After this the pkg directory is generated :)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rust-3d
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page