Skip to content
New issue

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

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

Already on GitHub? # to your account

Extension doesn't display signal on VSCode web #30

Open
mdanesh opened this issue Dec 10, 2024 · 4 comments
Open

Extension doesn't display signal on VSCode web #30

mdanesh opened this issue Dec 10, 2024 · 4 comments

Comments

@mdanesh
Copy link

mdanesh commented Dec 10, 2024

On web (vscode.dev) the extension doesn't render the waveform. Same waveform renders OK on desktop version of VSCode.

To Reproduce

  1. Download the following file https://vc.drom.io/?github=wavedrom/vcd-samples/trunk/swerv1.vcd
  2. Load and display in Desktop version -> Works fine
image
  1. Open vscode.dev on web browser (Chrome or Safari)
  2. Load the same VCD -> no signal display. The code editor attempts to open and fails.
image image

Does VaporView actually support VCCode web? Is there a setting that is missing?

Thanks in advance

@Lramseyer
Copy link
Owner

It doesn't support VScode web anymore, but I should be able to add that back in. I removed that support in version 1.1 when I moved all of the file handling over to node's fs library to support larger file sizes. I could implement a fallback method that supports web, but it would be limited in file size for waveform dumps. That won't be as much of a problem anymore now because it supports FST dumps.

In the meantime, you can try using version 1.0 or 1.0.1. It's far less optimized and polished, but it supports loading more than 8 variables without having to pay money!

If you want to look into creating a custom build that supports web, I would suggest looking in src/extension_core/document.ts, and commenting out the import of fs. Use vscode.workspace.fs instead. Then you would need to set loadStatic to true always. You might need to modify some of the build targets from node to web, but that should work.

I am trying to stabilize some changes and refactoring for the 1.2.5 release, but I'll keep this issue open as a to-do item, as adding web support is something I have been meaning to add back in!

@mdanesh
Copy link
Author

mdanesh commented Dec 11, 2024

Thanks for the quick feedback. What is the file size limit (VCD and FST) that you expect the web version would have?
The availability of this functionality on web is pretty useful. I'll keep a watch for when you can fold that in. Thanks.

@Lramseyer
Copy link
Owner

I'm not sure what the limit is for web, but I know that the vscode implementation of fs is limited to 2GB.

In my experience, FST files are significantly smaller than VCD files (VCD is uncompressed plaintext, FST is binary, and compressed) and I have seen a 50x difference between the two formats. If you're using a FST file larger than 2GB, than you probably work for a semiconductor company.

@Lramseyer
Copy link
Owner

OK, I added a test build in the releases section. Let me know if that fixes your issue!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants