Open jpnws opened 1 year ago
Well that's not a very helpful error message. Try this: can you make a new Cargo binary that contains the given main
function, then run:
MIRI_SYSROOT=$(cargo +nightly-2023-04-12 miri setup --print-sysroot) \
cargo +nightly-2023-04-12 aquascope interpreter
Does that work? It should print out:
{"Ok":{"steps":[{"stack":{"frames":[{"name":"main","body_span":{"start":0,"end":42,"filename":{"private":0}},"location":{"start":0,"end":9,"filename":{"private":0}},"locals":[]}]},"heap":{"locations":[]}},{"stack":{"frames":[{"name":"main","body_span":{"start":0,"end":42,"filename":{"private":0}},"location":{"start":14,"end":39,"filename":{"private":0}},"locals":[]}]},"heap":{"locations":[]}}],"result":{"type":"Success"}}}
The issue happened on my home computer but couldn't try out your suggestion yet.
However, I did try reproduing the issue on my work computer.
Strangely, it seems to work fine even with the same installation steps.
My work computer is Windows 11 which the same as my home computer.
I'll circle back to you when I get to try out your suggestion.
It just occurred to me, there was one subtle difference in the installation steps.
First, here are the steps - numbered:
On my home computer, the steps were: 2 -> set default rust to nightly -> 3 -> 4 -> 1.
On my work computer, the steps were: 2 -> 3 -> 4 -> 1 -> set default rust to nightly.
Regardless of whether it may have had anything to do with the issue ..
.. it's just something that was different about the two that stood out.
So, I was trying things out on my work computer.
I have this here:
With the following code (without the slashes "//"):
// ```aquascope,interpreter
struct Color(i32, i32, i32);
struct Point(i32, i32, i32);
fn main() {
let black = Color(0, 0, 0);
let origin = Point(0, 0, 0);
}
// ```
Is there a way to show the stack, heap, and permission diagrams?
The stack and heap diagrams should show given what you've written. Can you open the Javascript console and see if there's an error being reported?
Looks like I'm seeing some TypeErrors.
Ah, it seems like there's a bug in the published version of mdbook-aquascope
. Sorry about that. You can either:
Awesome, thanks, I'll try the source.
I was following the source, but had some issues on Windows.
So, tried it with WSL Ubuntu 22.04.
Cloned the repo, got to curling the install.sh
script.
But faced an issue when running cargo make init-bindings
.
uname@usys:~/projects/aquascope$ cargo make init-bindings
error: no such command: `make`
Did you mean `add`?
View all installed commands with `cargo --list`
Found out I needed to install cargo-make
, so I tried:
cargo install --force cargo-make
But got the following error:
error: linker `cc` not found
|
= note: No such file or directory (os error 2)
Looks like I had to do:
sudo apt-get update
sudo apt-get install build-essential
Then, cargo-make
installation worked, and in turn, cargo make init-bindings
worked as well.
However, was getting an error with depot build
.
So figured, maybe it was depot
from https://depot.dev/docs/cli/installation.
So, I install it, and tried it again.
Not knowing what depot really is, but did find out that I would have to execute:
depot build .
but at which point I got:
uname@usys:~/projects/aquascope/frontend$ depot build .
Error: missing API token, please run `depot login`
I think I'm stuck here.
I'm thinking I'll have to get the API token from https:://depot.dev.
@jpnws can you try the updated "From Source" instructions on the home page?
Also Depot is referring to our JS build tool: https://github.com/cognitive-engineering-lab/depot/
Hello 😄 I tried going through the steps to use aquascope, but I was getting an error.
This is how I have my files set up:
Here are the initial steps I took to install Aquascope, in order as shown on README:
I attempted
cargo install mdbook-aquascope
, but it failed due to the Rust nightly requirement.Following that, I executed the remaining steps, including
rustup toolchain install nightly ...
,cargo +nightly-2023-04-12 install --git ...
, andcargo +nightly-2023-04-12 miri setup
. I was then able to installmdbook-aquascope
.Next, I ran
mdbook init
, addedrust-toolchain.toml
to override the toolchain for the project, and appended[preprocessor.aquascope]
tobook.toml
. I also added a sample Rust code snippet inchapter_1.md
.After these steps,
mdbook build
began to fail, displaying the error message I described earlier.