You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Inderjit Gill 272164ac21 removed npm 1 year ago
client removed npm 1 year ago
core top level layout changes 1 year ago
server top level layout changes 1 year ago
.gitignore removed npm 1 year ago removing wasm-pack 1 year ago



core : the core game code, independent of output format (native/web etc). Written entirely in Rust

client : the web version, a wrapper around the core crate that generates wasm and js files build with: $ npm run build:dev

build release version with: $ npm run build:release

the generated wasm and js files will be in client/www/wasm

client/www : an npm package that uses the generated wasm and js files to build a web app. setup with: $ npm install

dev with: $ npm run start build for production with: $ npm run build

server : a separate rust codebase for serving the web app in client/www

(todo one day) native : a native build of Sokoban that wraps the core crate with a native sdk

ensure that the correct toolchain is installed

$ rustup update
$ rustup install nightly
$ rustup target add wasm32-unknown-unknown --toolchain nightly
$ cargo +nightly install wasm-bindgen-cli
$ cd client/www
$ npm install

during dev

in terminal 1:

$ cd client
$ npm run build:dev

in terminal 2:

$ cd client/www
$ npm run start

can now visit http://localhost:8080

changes to the rust code will require re-running the terminal 1 command:

$ npm run build:dev

for ‘release’

$ cd client
$ npm run build:release
$ cd client/www
$ npm run build

todo: ensure that everything required for release is in the client/www/dist directory