starknet-remix-plugin icon indicating copy to clipboard operation
starknet-remix-plugin copied to clipboard

Call/invoke responses next to function cards

Open rjnrohit opened this issue 2 years ago • 3 comments

Rearrange the UX of the "Interact" UI section to align with Voyager.

rjnrohit avatar Aug 17 '23 07:08 rjnrohit

Hi @rjnrohit I'm interested in tackling this first issue to get a first feel about the project. You can assign me to it 🙏

I've installed everything got the interface working on remix, though I encounter an issue when trying to compile a Cairo file

image

Tried to interact directly with the /api directly by calling http://0.0.0.0:8000/cairo_version

It crashes :

"timestamp":"2024-02-19T13:12:40.538395Z","level":"DEBUG","fields":{"message":"incoming body is empty"},"target":"hyper::proto::h1::conn"}
{"timestamp":"2024-02-19T13:12:40.538511Z","level":"TRACE","fields":{"message":"flushed({role=server}): State { reading: KeepAlive, writing: Init, keep_alive: Busy }"},"target":"hyper::proto::h1::conn"}
GET /cairo_version text/html:
   >> Matched: (cairo_version) GET /cairo_version
{"timestamp":"2024-02-19T13:12:40.539168Z","level":"INFO","fields":{"message":"/cairo_version"},"target":"api::handlers::cairo_version","span":{"_rate_limited":"RateLimited","name":"cairo_version"},"spans":[{"_rate_limited":"RateLimited","name":"cairo_version"}]}
error[E0635]: unknown feature `stdsimd`
  --> /Users/raf/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.7.6/src/lib.rs:33:42
   |
33 | #![cfg_attr(feature = "stdsimd", feature(stdsimd))]
   |                                          ^^^^^^^

For more information about this error, try `rustc --explain E0635`.
error: could not compile `ahash` (lib) due to 1 previous error
   >> Outcome: Success
   >> Response succeeded.
{"timestamp":"2024-02-19T13:12:47.704524Z","level":"TRACE","fields":{"message":"Server::encode status=200, body=Some(Unknown), req_method=Some(GET)"},"target":"hyper::proto::h1::role","span":{"name":"encode_headers"},"spans":[{"name":"encode_headers"}]}
{"timestamp":"2024-02-19T13:12:47.704783Z","level":"TRACE","fields":{"message":"no more write body allowed, user body is_end_stream = false"},"target":"hyper::proto::h1::dispatch"}
{"timestamp":"2024-02-19T13:12:47.704840Z","level":"DEBUG","fields":{"message":"flushed 326 bytes"},"target":"hyper::proto::h1::io"}
{"timestamp":"2024-02-19T13:12:47.704863Z","level":"TRACE","fields":{"message":"flushed({role=server}): State { reading: Init, writing: Init, keep_alive: Idle }"},"target":"hyper::proto::h1::conn"}
[Running 'cargo run']
rustc --explain E0635   
 
The #![feature] attribute specified an unknown feature.

Erroneous code example:

#![feature(nonexistent_rust_feature)] // error: unknown feature

I've tried to start the backend with

//Build 
cd api;
git submodule update --init;
cargo build;
export VITE_URL=http://localhost:3000
cargo run;

//Watch
cd api;
git submodule update --init;
export VITE_URL=http://localhost:3000
cargo install cargo-watch;
cargo watch -x run;

My question is do I need to install cairo apart? It's supposed to be shipped directly within /api, right? The problem comes from there as it crashes when I call it directly using http://0.0.0.0:8000/cairo_version

Have you already encountered this issue, or do you have an idea of how to solve it?

EDIT: I've seen some requirement on /api repo, I've successfully installed all of that and I'm able to run the test

I've also gone into /api/cairo manually to run Cairo installation and cargo run --bin starknet-compile works when inside this repo

EDIT2:

Seems to come from Mac M1 : similar issue

EDIT3:

It's an issue from the last version of Rust (1.78.0) as stdsimd has been deleted from rust-lang Thread with solution

TLDR:

rustup install 1.76.0
rustup default 1.76.0

foufrix avatar Feb 19 '24 13:02 foufrix

@rjnrohit currently the interface is like that

image

Could you add more information on how you want it to be ?

foufrix avatar Feb 19 '24 14:02 foufrix

@rjnrohit currently the interface is like that

image

Could you add more information on how you want it to be ?

You may add a response box just below the interactive form box in the interact section when a call has been made to any function and when it has received the response

rjnrohit avatar Feb 20 '24 07:02 rjnrohit