diff --git a/build.sh b/build.sh index 464dad8..112ffcb 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,13 @@ -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - brew install llvm zlib bzip2 +echo $(which clang) + +export PATH=/usr/local/opt/llvm/bin:$PATH + +echo $(which clang) + +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + source $HOME/.cargo/env rustup install 1.80.0 @@ -9,20 +15,28 @@ rustup default 1.80.0 rustup target add wasm32-unknown-unknown -cargo install --locked trunk +cargo install trunk npx tailwindcss -i ./styles.css -o ./output.css --minify -mkdir stdlib - +# Unpack stdlib +rm -rf stdlib && mkdir -p stdlib curl -L \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/aiken-lang/stdlib/tarball/main \ -o stdlib.tar - tar -xvf stdlib.tar --strip-components 1 -C stdlib - rm stdlib.tar +# Unpack fuzz +# rm -rf fuzz && mkdir -p fuzz +# curl -L \ +# -H "Accept: application/vnd.github+json" \ +# -H "X-GitHub-Api-Version: 2022-11-28" \ +# https://api.github.com/repos/aiken-lang/fuzz/tarball/main \ +# -o fuzz.tar +# tar -xvf fuzz.tar --strip-components 1 -C fuzz +# rm fuzz.tar + trunk build --release diff --git a/src/stdlib.rs b/src/stdlib.rs index 5f97383..60a96c9 100644 --- a/src/stdlib.rs +++ b/src/stdlib.rs @@ -1,40 +1,76 @@ -pub const MODULES: [(&str, &str); 14] = [ +pub const MODULES: [(&str, &str); 20] = [ + ("aiken/cbor", include_str!("../stdlib/lib/aiken/cbor.ak")), ( - "aiken/option", - include_str!("../stdlib/lib/aiken/option.ak"), + "aiken/collection", + include_str!("../stdlib/lib/aiken/collection.ak"), + ), + ( + "aiken/collection/dict", + include_str!("../stdlib/lib/aiken/collection/dict.ak"), + ), + ( + "aiken/collection/list", + include_str!("../stdlib/lib/aiken/collection/list.ak"), + ), + ( + "aiken/collection/pairs", + include_str!("../stdlib/lib/aiken/collection/pairs.ak"), + ), + ( + "aiken/crypto", + include_str!("../stdlib/lib/aiken/crypto.ak"), ), ( "aiken/interval", include_str!("../stdlib/lib/aiken/interval.ak"), ), - ("aiken/time", include_str!("../stdlib/lib/aiken/time.ak")), ("aiken/math", include_str!("../stdlib/lib/aiken/math.ak")), - ("aiken/hash", include_str!("../stdlib/lib/aiken/hash.ak")), - ( - "aiken/bytearray", - include_str!("../stdlib/lib/aiken/bytearray.ak"), - ), - ("aiken/dict", include_str!("../stdlib/lib/aiken/dict.ak")), - ("aiken/int", include_str!("../stdlib/lib/aiken/int.ak")), - ("aiken/list", include_str!("../stdlib/lib/aiken/list.ak")), ( "aiken/math/rational", include_str!("../stdlib/lib/aiken/math/rational.ak"), ), ( - "aiken/transaction/credential", - include_str!("../stdlib/lib/aiken/transaction/credential.ak"), + "aiken/option", + include_str!("../stdlib/lib/aiken/option.ak"), + ), + ( + "aiken/primitive/bytearray", + include_str!("../stdlib/lib/aiken/primitive/bytearray.ak"), + ), + ( + "aiken/primitive/int", + include_str!("../stdlib/lib/aiken/primitive/int.ak"), + ), + ( + "aiken/primitive/string", + include_str!("../stdlib/lib/aiken/primitive/string.ak"), + ), + ( + "cardano/address", + include_str!("../stdlib/lib/cardano/address.ak"), + ), + ( + "cardano/assets", + include_str!("../stdlib/lib/cardano/assets.ak"), + ), + ( + "cardano/certificate", + include_str!("../stdlib/lib/cardano/certificate.ak"), + ), + ( + "cardano/governance", + include_str!("../stdlib/lib/cardano/governance.ak"), ), ( - "aiken/transaction/certificate", - include_str!("../stdlib/lib/aiken/transaction/certificate.ak"), + "cardano/governance/protocol_parameters", + include_str!("../stdlib/lib/cardano/governance/protocol_parameters.ak"), ), ( - "aiken/transaction/value", - include_str!("../stdlib/lib/aiken/transaction/value.ak"), + "cardano/script_context", + include_str!("../stdlib/lib/cardano/script_context.ak"), ), ( - "aiken/transaction", - include_str!("../stdlib/lib/aiken/transaction.ak"), + "cardano/transaction", + include_str!("../stdlib/lib/cardano/transaction.ak"), ), ];