-
Notifications
You must be signed in to change notification settings - Fork 1
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
TLS Notary WASM client #75
Conversation
the existing way of using unsafe does not work. I then followed https://rustwasm.github.io/wasm-bindgen/reference/arbitrary-data-with-serde.html to use JSON as input
now: ws_stream_wasm::ws_meta: WsMeta::connect future was dropped while connecting
can't read from filesystem in wasm
end to end, wasm client notarizing via websocket proxy to target
to make things a bit easier, we can assume: wasm target -> always websockets (via web-sys/js-sys) |
Good news, in .cargo/config.toml we can omit the following:
... by running:
Docs:
Why is this nice? This has been a blocker to build any other stuff than WASM inside the same workspace. |
use wasm-pack build --release --target web /home/matt/dev/34-web-prover/web-prover -- -Z build-std=panic_abort,std to build the WASM module
println!("cargo:rerun-if-changed=.git/HEAD"); | ||
println!("cargo:rerun-if-changed=.git/refs/heads/main"); | ||
} else { | ||
// Set the PATH environment variable for wasm32 target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this. The only way to abort the main rust compilation is to abort here with process exist status >0 which would indicate the compilation failed.
I removed the eyre result from main, I couldn't find the NotaryServerError object
(remove shallow notary directory)
That is correct. Header keys can have multiple values. Subtle detail, but prob fine to leave for now. |
lib.rs as lib entrypoint, introduce cfg_if, trying to make wasm compile again
tracing should always be available. I removed the feature flag. The developer will configure it by setting the right log level. this allows debugging without rebuilding and redeploying the same built. |
20a7c2e might be controversial. I'm happy to discuss if we all agree this is going in the right direction or not. |
LFG |
This branch tracks changes to make the TLS Notary WASM client work in its current form.
I commented out anything else that's not WASM related. I will try to bring this back. As discussed the WASM module most likely needs to be isolated in it's own crate.