Return a hello world string in Node from Rust.
- Git
- Node.js
- Rust
- Python (
2.7+
) - Visual Studio C++ Build tools
Follow below npm scripts command to run locally.
Install npm
and cargo
packages also build typescript and rust.
npm i
# or
npm install
npm start
# Output
Hello, World from RUST!
Run lint using npm run lint
for rust (cargo clippy
) and typescript (eslint
)
Run format using npm run format
for rust (cargo fmt
) and typescript (prettier
)
Test project using npm run lint
. Test covered both rust (cargo test native --release
) and typescript (jest
).
Clean project with npm run clean
. It includes neon clean
as well.
Minifiy and pack the projects(npm run pack
).
Setup the project by npm run setup
.
- clean script should be more programmatically.
- write code format automatically.
- code coverage with grcov
-
--release
is required because neon only builds with release flag. E.g: for tests, trycargo test --release
-
If you are in windows make sure you follow issue