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

Update to use the runtime in stacks-blockchain #57

Merged
merged 26 commits into from
Sep 14, 2023

Conversation

obycode
Copy link
Collaborator

@obycode obycode commented Sep 1, 2023

This changeset together with stacks-network/stacks-core#3880 move the runtime parts of our Wasm runtime into the stacks-blockchain clarity package.

@Acaccia
Copy link
Collaborator

Acaccia commented Sep 1, 2023

Could you please explain why you removed the 'a lifetime parameter from ASTVisitor, but replaced it with a per function 'c lifetime?
In my current PR #56, I completely removed this lifetime and it works fine.

@obycode obycode force-pushed the feat/clarity-wasm-runtime branch 2 times, most recently from 6a885ab to 23c07c2 Compare September 12, 2023 18:29
@obycode
Copy link
Collaborator Author

obycode commented Sep 12, 2023

Rebased on top of latest main.

@obycode obycode force-pushed the feat/clarity-wasm-runtime branch 2 times, most recently from 647f1fc to 8221579 Compare September 13, 2023 19:11
After running through the entire module, we can then set the
stack-pointer to point to the end of the literal memory. Without doing
that, then writing to a functions stack could overwrite the literals.
This was happening with the previous solution that was setting the
global in the `.top-level` function, but because that runs in a separate
environment from calls to that contract, that made no difference. The
initial value needed to be changed instead.
@obycode
Copy link
Collaborator Author

obycode commented Sep 13, 2023

I'm not sure how to fix that clippy error from our testing macro...

@Acaccia
Copy link
Collaborator

Acaccia commented Sep 14, 2023

clar2wasm/Cargo.toml Outdated Show resolved Hide resolved
clar2wasm/benches/benchmark.rs Show resolved Hide resolved
clar2wasm/src/wasm_generator.rs Show resolved Hide resolved
clar2wasm/tests/standard/utils.rs Outdated Show resolved Hide resolved
tests/Cargo.toml Outdated Show resolved Hide resolved
.github/workflows/ci.yaml Show resolved Hide resolved
.github/workflows/ci.yaml Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
clar2wasm/src/lib.rs Outdated Show resolved Hide resolved
clar2wasm/src/wasm_generator.rs Show resolved Hide resolved
clar2wasm/src/wasm_generator.rs Outdated Show resolved Hide resolved
clar2wasm/src/wasm_generator.rs Outdated Show resolved Hide resolved
clar2wasm/src/wasm_generator.rs Outdated Show resolved Hide resolved
clar2wasm/src/wasm_generator.rs Outdated Show resolved Hide resolved
@Acaccia
Copy link
Collaborator

Acaccia commented Sep 14, 2023

BTW, I know I was the one suggesting it, but the submodules makes the coding experience really poor on vscode. Clippy runs on the submodule, and I don't get why, since it should just run on the members of Cargo.toml.
We should find the tweaks to add to .vscode/settings.json.

@obycode
Copy link
Collaborator Author

obycode commented Sep 14, 2023

That is already fixed in main https://github.com/stacks-network/clarity-wasm/blob/0fbfc1ae8bd93a03a806734e9a525b0cda1915e3/tests/tests/lib_tests.rs#L63L65

Did you merge main into your branch?

Strange, yes, I did rebase on top of main. This must've gotten lost in the merge somewhere. I will double check to ensure that merging didn't lose anything else.

@obycode obycode added this pull request to the merge queue Sep 14, 2023
Merged via the queue into main with commit 5339e35 Sep 14, 2023
3 checks passed
@obycode obycode deleted the feat/clarity-wasm-runtime branch September 14, 2023 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants