Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use class instance variables #2025

Merged
merged 33 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
79b7989
reorganize build process
lastmjs Aug 21, 2024
3597bc7
try to get the stable tests to pass
lastmjs Aug 23, 2024
92afbaf
reorganize
lastmjs Aug 23, 2024
f82159b
fix the azle package path variable
lastmjs Aug 23, 2024
7a8f924
move the new test for http-server into http-server, change dfx.json e…
lastmjs Aug 23, 2024
de999b5
fix broken class_syntax tests
lastmjs Aug 23, 2024
3efa078
remove candid_gen automatic
lastmjs Aug 23, 2024
074c1de
remove newlines in dfx.json and fix phone-book tsconfig.json
lastmjs Aug 26, 2024
8133d75
clean up the stable stuff
lastmjs Aug 26, 2024
0485b49
experimental mode moving along, ensuring stable is only stable
lastmjs Aug 27, 2024
8bc3641
greatly refactor the wasm binary manpipulation, tis beautiful now
lastmjs Aug 27, 2024
b8c096e
experimental section nearly complete
lastmjs Aug 27, 2024
1f93354
Merge branch 'main' of github.com:demergent-labs/azle into build_process
lastmjs Aug 27, 2024
7658e41
fix dfx.json files to use custom inside of functional_syntax
lastmjs Aug 27, 2024
d0bf32e
update dfx.json files in http_server tests
lastmjs Aug 27, 2024
14f8ad6
fix the example dfx.json
lastmjs Aug 27, 2024
bc9ece9
remove candid_gen automatic in property testS
lastmjs Aug 27, 2024
c21f1df
allow basic asset uploading
lastmjs Aug 27, 2024
60b8319
add build assets
lastmjs Aug 27, 2024
0171f98
add candid_gen http
lastmjs Aug 27, 2024
3aaecdc
update a couple bitcoin examples with candid_gen http
lastmjs Aug 27, 2024
9cc86c6
fix nest and typeorm problem
lastmjs Aug 27, 2024
6f108c9
attempt to fix autoreload file watching
lastmjs Aug 27, 2024
ca4916d
remove compile directory mostly
lastmjs Aug 27, 2024
b9ee2a2
move rust
lastmjs Aug 27, 2024
a903e55
stop experimental dfx.json values from being used in a stable canister
lastmjs Aug 28, 2024
c48acd5
handle TODOs in build/experimental
lastmjs Aug 28, 2024
de9bea4
change global variable to azle node wasm environment
lastmjs Aug 28, 2024
a6b1d97
update wasm binaries
lastmjs Aug 28, 2024
af700d0
add ability to create proxies that provide insight into being used on…
lastmjs Aug 28, 2024
d4e3ba3
improve wasmedge_quickjs installation process
lastmjs Aug 28, 2024
1b3ba12
use add instead of set for sparse checkout
lastmjs Aug 28, 2024
6bf5eea
change global experimental check to be a side-effect import
lastmjs Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ declarations
property_tests/tests/**/src/*
dist
static_canister_template_licenses.yml
wasmedge_quickjs
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ jobs:
"tests/end_to_end/candid_rpc/class_syntax/motoko_examples/superheroes",
"tests/end_to_end/candid_rpc/class_syntax/motoko_examples/threshold_ecdsa",
"tests/end_to_end/candid_rpc/class_syntax/motoko_examples/whoami",
"tests/end_to_end/candid_rpc/class_syntax/new",
"tests/end_to_end/candid_rpc/class_syntax/new_candid_rpc",
"tests/end_to_end/candid_rpc/class_syntax/notify_raw",
"tests/end_to_end/candid_rpc/class_syntax/null_example",
Expand Down Expand Up @@ -284,6 +283,7 @@ jobs:
"tests/end_to_end/http_server/internet_identity",
"tests/end_to_end/http_server/large_files",
"tests/end_to_end/http_server/nest",
"tests/end_to_end/http_server/new",
"tests/end_to_end/http_server/open_value_sharing",
"tests/end_to_end/http_server/sqlite",
"tests/end_to_end/http_server/sqlite_drizzle",
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
dist
node_modules
target
wasmedge_quickjs
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@
!package.json
!README.md
!server.did
!wasmedge_quickjs/**
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ target
/the_azle_book/book
/docs
static_canister_template_licenses.yml
/wasmedge_quickjs
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[workspace]
members = ["src/compiler/rust/canister", "src/compiler/rust/open_value_sharing"]
members = ["src/build/rust/canister", "src/build/rust/open_value_sharing"]
Binary file modified canister_templates/experimental.wasm
Binary file not shown.
Binary file modified canister_templates/stable.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion dfx_extension/extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"canister_type": {
"defaults": {
"candid": ".azle/{{canister_name}}/{{canister_name}}.did",
"build": "npx azle {{canister_name}}",
"build": "npx azle compile {{canister_name}}",
"post_install": "npx azle upload-assets {{canister_name}}",
"wasm": ".azle/{{canister_name}}/{{canister_name}}.wasm",
"gzip": true,
Expand Down
5 changes: 3 additions & 2 deletions examples/basic_bitcoin/dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"basic_bitcoin": {
"type": "azle",
"main": "src/index.ts",
"env": ["BITCOIN_NETWORK"],
"custom": {
"experimental": true
"experimental": true,
"candid_gen": "http",
"env": ["BITCOIN_NETWORK"]
}
}
},
Expand Down
5 changes: 3 additions & 2 deletions examples/bitcoin_psbt/dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"bitcoin_psbt": {
"type": "azle",
"main": "src/index.ts",
"env": ["BITCOIN_NETWORK"],
"custom": {
"experimental": true
"experimental": true,
"candid_gen": "http",
"env": ["BITCOIN_NETWORK"]
}
}
},
Expand Down
9 changes: 6 additions & 3 deletions examples/ckbtc/dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@
"type": "azle",
"main": "wallet/backend/index.ts",
"candid": "wallet/backend/index.did",
"candid_gen": "custom",
"env": ["CK_BTC_PRINCIPAL", "MINTER_PRINCIPAL"],
"assets": [["minter/minter.did", "minter/minter.did"]],
"declarations": {
"node_compatibility": true,
"output": "wallet/frontend/dfx_generated/wallet_backend"
},
"custom": {
"experimental": true,
"assets": [["minter/minter.did", "minter/minter.did"]],
"candid_gen": "custom",
"env": ["CK_BTC_PRINCIPAL", "MINTER_PRINCIPAL"]
}
},
"wallet_frontend": {
Expand Down
6 changes: 3 additions & 3 deletions examples/hello_world/dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"backend": {
"type": "azle",
"main": "src/backend/index.ts",
"assets": [["src/frontend/dist", "dist"]],
"build_assets": "npm run build",
"custom": {
"experimental": true
"experimental": true,
"assets": [["src/frontend/dist", "dist"]],
"build_assets": "npm run build"
}
}
}
Expand Down
1 change: 0 additions & 1 deletion examples/hello_world_candid_rpc/dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"hello_world": {
"type": "azle",
"main": "src/index.ts",
"candid_gen": "automatic",
"declarations": {
"output": "test/dfx_generated/hello_world",
"node_compatibility": true
Expand Down
6 changes: 1 addition & 5 deletions experimental/canisters/icrc/errors.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import { experimentalMessage } from '../../../src/lib/experimental/experimental';

if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}
import '../../../src/lib/experimental/experimental';

import { Record } from '../../../src/lib/experimental/candid/types/constructed/record';
import { nat } from '../../../src/lib/experimental/candid/types/primitive/nats/nat';
Expand Down
6 changes: 1 addition & 5 deletions experimental/canisters/icrc/icrc_1.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import { experimentalMessage } from '../../../src/lib/experimental/experimental';

if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}
import '../../../src/lib/experimental/experimental';

import {
blob,
Expand Down
6 changes: 1 addition & 5 deletions experimental/canisters/icrc/icrc_2.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import { experimentalMessage } from '../../../src/lib/experimental/experimental';

if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}
import '../../../src/lib/experimental/experimental';

import { blob } from '../../../src/lib/experimental/candid/types/constructed/blob';
import { Opt } from '../../../src/lib/experimental/candid/types/constructed/opt';
Expand Down
6 changes: 1 addition & 5 deletions experimental/canisters/icrc/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import { experimentalMessage } from '../../../src/lib/experimental/experimental';

if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}
import '../../../src/lib/experimental/experimental';

import {
Canister,
Expand Down
6 changes: 1 addition & 5 deletions experimental/canisters/ledger/address/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import { experimentalMessage } from '../../../../src/lib/experimental/experimental';

if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}
import '../../../../src/lib/experimental/experimental';

import { Principal } from '@dfinity/principal';
import { getCrc32 } from '@dfinity/principal/lib/esm/utils/getCrc';
Expand Down
7 changes: 1 addition & 6 deletions experimental/canisters/ledger/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import { experimentalMessage } from '../../../src/lib/experimental/experimental';

if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}
import '../../../src/lib/experimental/experimental';

// Some JS docs licensed under:
//
Expand All @@ -11,7 +7,6 @@ if (globalThis._azleExperimental !== true) {
// - https://github.com/dfinity/portal/blob/master/LICENSE
//
// Some documentation changed from original work.

import {
blob,
Canister,
Expand Down
7 changes: 1 addition & 6 deletions experimental/canisters/management/bitcoin.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { experimentalMessage } from '../../../src/lib/experimental/experimental';

if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}
import '../../../src/lib/experimental/experimental';

// TODO I am thinking we should use the same names as ic-btc-types

import {
blob,
nat32,
Expand Down
7 changes: 1 addition & 6 deletions experimental/canisters/management/canister_info.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import { experimentalMessage } from '../../../src/lib/experimental/experimental';

if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}
import '../../../src/lib/experimental/experimental';

// JS docs licensed under:
//
// - https://github.com/dfinity/cdk-rs/blob/main/LICENSE
//
// Some documentation changed from original work.

import { Opt } from '../../../src/lib/experimental/candid/types/constructed/opt';
import { Record } from '../../../src/lib/experimental/candid/types/constructed/record';
import { Variant } from '../../../src/lib/experimental/candid/types/constructed/variant';
Expand Down
6 changes: 1 addition & 5 deletions experimental/canisters/management/canister_management.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import { experimentalMessage } from '../../../src/lib/experimental/experimental';

if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}
import '../../../src/lib/experimental/experimental';

import {
blob,
Expand Down
6 changes: 1 addition & 5 deletions experimental/canisters/management/http_request.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import { experimentalMessage } from '../../../src/lib/experimental/experimental';

if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}
import '../../../src/lib/experimental/experimental';

import {
blob,
Expand Down
7 changes: 1 addition & 6 deletions experimental/canisters/management/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import { experimentalMessage } from '../../../src/lib/experimental/experimental';

if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}
import '../../../src/lib/experimental/experimental';

// Some JS docs licensed under:
//
// - https://github.com/dfinity/cdk-rs/blob/main/LICENSE
//
// Some documentation changed from original work.

import { blob } from '../../../src/lib/experimental/candid/types/constructed/blob';
import { Vec } from '../../../src/lib/experimental/candid/types/constructed/vec';
import { Void } from '../../../src/lib/experimental/candid/types/primitive/void';
Expand Down
6 changes: 1 addition & 5 deletions experimental/canisters/management/t_ecdsa.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import { experimentalMessage } from '../../../src/lib/experimental/experimental';

if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}
import '../../../src/lib/experimental/experimental';

import { blob } from '../../../src/lib/experimental/candid/types/constructed/blob';
import { Opt } from '../../../src/lib/experimental/candid/types/constructed/opt';
Expand Down
6 changes: 1 addition & 5 deletions experimental/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import { experimentalMessage } from '../src/lib/experimental/experimental';

if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}
import '../src/lib/experimental/experimental';

export * from '../src/lib/experimental';
11 changes: 0 additions & 11 deletions install_script.sh

This file was deleted.

10 changes: 10 additions & 0 deletions install_wasmedge_quickjs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
WASMEDGE_REPO_PATH="./wasmedge_quickjs"

rm -rf "$WASMEDGE_REPO_PATH"

git clone --depth 1 --filter=blob:none --sparse https://github.com/demergent-labs/wasmedge-quickjs "$WASMEDGE_REPO_PATH"
cd "$WASMEDGE_REPO_PATH"
git sparse-checkout set modules
git sparse-checkout add LICENSE
git sparse-checkout add LICENSE-QuickJS.txt
git checkout c21ff69f442998e4cda4619166e23a9bc91418be
3 changes: 1 addition & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
"scripts": {
"typecheck": "tsc --noEmit",
"lint": "if [ \"$npm_config_fix\" ]; then eslint . --ext .js,.ts --cache --fix; else eslint . --ext .js,.ts --cache; fi",
"prepare": "husky install",
"test": "test/test.sh",
"install": "./install_script.sh"
"prepare": "./install_wasmedge_quickjs.sh && husky install",
"test": "test/test.sh"
},
"type": "module",
"bin": {
"azle": "./src/compiler/index.ts"
"azle": "./src/build/index.ts"
},
"main": "./src/lib/stable/index.ts",
"repository": {
Expand Down
Loading
Loading