Installing Dependencies
Install the required build tools and development packages:
opkg install git git-http python3 python3-pip make gcc coreutils-install
Installing CMake
CMake is required for building native dependencies:
pip install cmake
Installing Rust
Install Rust using rustup, the official Rust toolchain installer:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Building and Running QuickJS
Clone the rquickjs-cli test repository:
git clone https://github.com/ahaoboy/rquickjs-cli.git
cd rquickjs-cli/
echo "console.log('hello openwrt')" > test.js
cargo run -- ./test.js
Expected Output
hello openwrt
Top comments (0)