diff options
author | Matt Strapp <matt@mattstrapp.net> | 2024-04-05 16:40:12 -0500 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2024-04-05 16:40:12 -0500 |
commit | 925180e2dcb2b95cb2777a75e1491499c0d69936 (patch) | |
tree | c01a7936f87dc3ce82ce8734ee9c2381f2aa8029 /packages | |
parent | Bump typescript from 5.4.3 to 5.4.4 (diff) | |
download | zorascript-925180e2dcb2b95cb2777a75e1491499c0d69936.tar zorascript-925180e2dcb2b95cb2777a75e1491499c0d69936.tar.gz zorascript-925180e2dcb2b95cb2777a75e1491499c0d69936.tar.bz2 zorascript-925180e2dcb2b95cb2777a75e1491499c0d69936.tar.lz zorascript-925180e2dcb2b95cb2777a75e1491499c0d69936.tar.xz zorascript-925180e2dcb2b95cb2777a75e1491499c0d69936.tar.zst zorascript-925180e2dcb2b95cb2777a75e1491499c0d69936.zip |
Add rust
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'packages')
-rw-r--r-- | packages/zora-rs/.travis.yml | 69 | ||||
-rw-r--r-- | packages/zorascript/package.json | 15 | ||||
-rw-r--r-- | packages/zorascript/src/enums.ts | 31 | ||||
-rw-r--r-- | packages/zorascript/tsconfig.json | 11 |
4 files changed, 69 insertions, 57 deletions
diff --git a/packages/zora-rs/.travis.yml b/packages/zora-rs/.travis.yml new file mode 100644 index 0000000..7a91325 --- /dev/null +++ b/packages/zora-rs/.travis.yml @@ -0,0 +1,69 @@ +language: rust +sudo: false + +cache: cargo + +matrix: + include: + + # Builds with wasm-pack. + - rust: beta + env: RUST_BACKTRACE=1 + addons: + firefox: latest + chrome: stable + before_script: + - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update) + - (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate) + - cargo install-update -a + - curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f + script: + - cargo generate --git . --name testing + # Having a broken Cargo.toml (in that it has curlies in fields) anywhere + # in any of our parent dirs is problematic. + - mv Cargo.toml Cargo.toml.tmpl + - cd testing + - wasm-pack build + - wasm-pack test --chrome --firefox --headless + + # Builds on nightly. + - rust: nightly + env: RUST_BACKTRACE=1 + before_script: + - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update) + - (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate) + - cargo install-update -a + - rustup target add wasm32-unknown-unknown + script: + - cargo generate --git . --name testing + - mv Cargo.toml Cargo.toml.tmpl + - cd testing + - cargo check + - cargo check --target wasm32-unknown-unknown + - cargo check --no-default-features + - cargo check --target wasm32-unknown-unknown --no-default-features + - cargo check --no-default-features --features console_error_panic_hook + - cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook + - cargo check --no-default-features --features "console_error_panic_hook wee_alloc" + - cargo check --target wasm32-unknown-unknown --no-default-features --features "console_error_panic_hook wee_alloc" + + # Builds on beta. + - rust: beta + env: RUST_BACKTRACE=1 + before_script: + - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update) + - (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate) + - cargo install-update -a + - rustup target add wasm32-unknown-unknown + script: + - cargo generate --git . --name testing + - mv Cargo.toml Cargo.toml.tmpl + - cd testing + - cargo check + - cargo check --target wasm32-unknown-unknown + - cargo check --no-default-features + - cargo check --target wasm32-unknown-unknown --no-default-features + - cargo check --no-default-features --features console_error_panic_hook + - cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook + # Note: no enabling the `wee_alloc` feature here because it requires + # nightly for now. diff --git a/packages/zorascript/package.json b/packages/zorascript/package.json deleted file mode 100644 index ce749e9..0000000 --- a/packages/zorascript/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "zorascript", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "Matt Strapp <matt@mattstrapp.net>", - "license": "LGPL-3.0-only", - "devDependencies": { - - } -} diff --git a/packages/zorascript/src/enums.ts b/packages/zorascript/src/enums.ts deleted file mode 100644 index 221292d..0000000 --- a/packages/zorascript/src/enums.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * The region for the game - * - * @remarks - * - * In most cases NA and EU are the same, but there are some small differences mainly involving name encoding. - */ -const enum Region { - Japan = "JP", - NorthAmerica = "NA", - Europe = "EU" -} - -/** - * Specifies the specific Oracle game - */ -const enum Game { - Ages = 0, - Seasons = 1 -} - -const enum AnimalFriend { - Ricky = 0x0b, - Dimitri = 0x0c, - Moosh = 0x0d -} - -const enum ChildQuestion { - NoEgg = 0, - YesChicken = 0x2, -} diff --git a/packages/zorascript/tsconfig.json b/packages/zorascript/tsconfig.json deleted file mode 100644 index 1b2dbb2..0000000 --- a/packages/zorascript/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es2015", - "declaration": true, - "outDir": "./dist" - }, - "include": [ - "src/**/*" - ] -}
\ No newline at end of file |