5 ms·
Time to give this lang a try. Been wanting to build a web assembly large data table mechanism for a while, and rust appears to be an idea candidate from what i
by ossworkerrights 7y ago
Time to give this lang a try. Been wanting to build a web assembly large data table mechanism for a while, and rust appears to be an idea candidate from what i read (speed and reliability). Although it could be done using SQLite, i think could be a nice little project for learning Rust.
- juancampa 7y agoDo it! Make sure you "Show HN" it later too
- mikece 7y agoWhy target WebAssembly instead of straight native? I know that Rust is one of the "ideal" languages for WebAssembly but I thought the main point was systems level programming, not for writing code that runs in a web browser.
- TazeTSchnitzel 7y agoWhy wouldn't someone do systems programming for the web browser?
- MaulingMonkey 7y agoMy primary interest in Rust is for gamedev, as an alternative to C++. The library ecosystem is a bit weak right now, although there's a lot of interest and people working to fix that, and I think the fundamental language is a great fit. WASM lets me reuse the same codebase to host demos/previews/simpler games directly inside of a website, without needing to convince the user it's trustworthy and worth their time to download/install/grant permissions to first. I'm sure other SPAs could also see benefits...
- mamcx 7y agoYou are talking about a db engine? P.D: I'm building a relational language (not engine, but could be part of it)
- ossworkerrights 7y agoHmm well, what I had in mind was something more of and array of arrays, where each array is a row and at each index there is a column. What I had in mind is a download of such arrays, inject them to wasm, and then access them using an external interface. Was thinking about using basic array methods as I am pretty much non experienced in Rust, and would be a good learning exercise. A relational language tho might be interesting.
- mamcx 7y agoWell, I'm not far from it. The original plan was base all on top a ndarray. I backed off when see how problematic was to do CRUD operations and JOINS. Now I support: Scalars, Vectors, Tables (Vectors of Row vectors) and Indexed tables (Table alike on top of BTree). Now i'm trying to solve how incorporate iterators (https://www.reddit.com/r/rust/comments/dnhzo1/for_a_interpreter_need_a_way_to_support_opaque/ https://www.reddit.com/r/rust/comments/dnhzo1/for_a_interpre...). Solving this the lang is ready to go for a MPV. I plan to use for real for my projects, so is not just a exercise for fun.
- TazeTSchnitzel 7y agoIt's a pleasant suprise how easy targeting wasm is from Rust. Just pass on the right `--target` flag to `cargo build` if you have the toolchain installed.
- MaulingMonkey 7y agoAnd installing the right target is typically as simple as: rustup target add wasm32-unknown-unknown Targeting browser APIs is a little more involved, generally requiring either: cargo install cargo-web cargo web build [...] for stdweb, or for web-sys: cargo install wasm-pack wasm-pack build [...]
- johnisgood 7y agoIn all fairness, `GOARCH=wasm GOOS=js go build` is just as easy.