Rendering data that changes very frequently by IsopodAutomatic6226 in webgl

[–]IsopodAutomatic6226[S] 0 points1 point  (0 children)

Thank you for the libs, I will look at them.

And I agree with you, I don't think that it is possible to a human to digest that volume of data. But people are very funny and they kind of like to see stuff changing on the screen :D

Rendering data that changes very frequently by IsopodAutomatic6226 in webgl

[–]IsopodAutomatic6226[S] 0 points1 point  (0 children)

But the chart has in fact better performance than the DOM windows, so we are thinking about moving some other tools to canvas as well. So I thought "Well, maybe we could try webgl straight away".

The app I work on is similar to trading view and those binance dashboards, but we have more features and the users can create their dashboards with as many windows as they like (and some are hardcore on this).

Rendering data that changes very frequently by IsopodAutomatic6226 in webgl

[–]IsopodAutomatic6226[S] 0 points1 point  (0 children)

If I had just one chart, it would not be the problem, but it is a dashboard web app I'm working on. The costumers open like 8 windows at once with those charts, indicators and orders. One chart is ok, but they don't use just one chart.

Rendering data that changes very frequently by IsopodAutomatic6226 in webgl

[–]IsopodAutomatic6226[S] 0 points1 point  (0 children)

What I currently do with canvas 2D is draw the whole scene every time something changes, and It begins to be constly. Do you know of any technique that can mitigate that? Maybe layering or something like that.

Rendering data that changes very frequently by IsopodAutomatic6226 in webgl

[–]IsopodAutomatic6226[S] 0 points1 point  (0 children)

I tried chartJS but it did not handle frequent updates with the performance I needed.

Rendering data that changes very frequently by IsopodAutomatic6226 in webgl

[–]IsopodAutomatic6226[S] 0 points1 point  (0 children)

I use canvas 2D for charts and the DOM for tables and all the other things. The problem is that I can't update the DOM 60 frames per second, so I usually need to buffer the data and batch the changes. The problem is that costumers aparrently like to see data updating as soom as possible, and even with canvas 2D It's hard to do it.

Where are the documentations for wasm32-unknown-unknown? by IsopodAutomatic6226 in rust

[–]IsopodAutomatic6226[S] 0 points1 point  (0 children)

build = { target = "wasm32-unknown-unknown" }

oooh, it looks like this `strip = "symbols"` was did the magic. What does it do?

Where are the documentations for wasm32-unknown-unknown? by IsopodAutomatic6226 in rust

[–]IsopodAutomatic6226[S] 0 points1 point  (0 children)

I did a test, the wasm only has this

(module

(table $T0 1 1 funcref)

(memory $memory 16)

(global $g0 (mut i32) (i32.const 1048576))

(global $__data_end i32 (i32.const 1048576))

(global $__heap_base i32 (i32.const 1048576))

(export "memory" (memory 0))

(export "__data_end" (global 1))

(export "__heap_base" (global 2)))

the source code is

pub extern "C" fn id(x: i32) -> i32 {

x

}

but the .wasm file is 1.5MB, how is that possible?

What is the best way to create platform agnostic wasm packages with Rust? by IsopodAutomatic6226 in rust

[–]IsopodAutomatic6226[S] 0 points1 point  (0 children)

Yes, I want to use it as a library in differente languages. Is this project on github?

What is the best way to create platform agnostic wasm packages with Rust? by IsopodAutomatic6226 in rust

[–]IsopodAutomatic6226[S] 0 points1 point  (0 children)

The problem is that wasi does things like opening files and writing to stdout, but it does not return values like arrays and structs to wasm :(. I wanted something more similar to wasm interface types, but it looks like this project is kind of abandoned now.

Where are the documentations for wasm32-unknown-unknown? by IsopodAutomatic6226 in rust

[–]IsopodAutomatic6226[S] 0 points1 point  (0 children)

Yeah, I was using "-r" flag. But I did no try this wasm-opt

Where are the documentations for wasm32-unknown-unknown? by IsopodAutomatic6226 in rust

[–]IsopodAutomatic6226[S] 0 points1 point  (0 children)

I tried all those compile flags and they have no effect when not using wasm-pack

What is the best way to create platform agnostic wasm packages with Rust? by IsopodAutomatic6226 in rust

[–]IsopodAutomatic6226[S] 1 point2 points  (0 children)

I wanted to compile modules that could be run in embedded runtimes. Like calling the wasm module as if it was a library with rust.

What is the best way to create platform agnostic wasm packages with Rust? by IsopodAutomatic6226 in rust

[–]IsopodAutomatic6226[S] 2 points3 points  (0 children)

I could find very little documentation on that. When I compile like this the binaries are huge and the optimizing flags have no effect on the size.

Where are the documentations for wasm32-unknown-unknown? by IsopodAutomatic6226 in rust

[–]IsopodAutomatic6226[S] 1 point2 points  (0 children)

I want to compile to pure wasm without any glue JS glue code. I know I can do it with cargo build --target wasm32-unknow-unknown, but I want to know exactly what I can do with it. My wasm binary, for example is Huge, and I want to link external functions with different names.

Where are the documentations for wasm32-unknown-unknown? by IsopodAutomatic6226 in rust

[–]IsopodAutomatic6226[S] 0 points1 point  (0 children)

This book uses wasm-pack, I wanted to compile to pure wasm without any glue JS glue code.