Need help with emscripten port

I should have explained my use case: i have a rust crate, which should do "platform independent" stuff, calculating diff values of two lists in my case, which is done in rust. But i also need "platform dependent" code, in my case: applying the diffs onto the dom (im developing a react.js-kind of thing for rust; it's very POC). So im bundling rust-code and "native" js-code into one crate.

Im doing it right now by patching emscripten, so it accepts emscriptens-js-library scripts being passed by -l and -L arguments. So it behaves on emscriptens-js-library files like they were .a or '.o' files (rustc only allows the -l and -L being passed by a depended crate).

That's the way im doing it right now, but maybe there is already a way to do this (bundle rust + js code in a depended crate) im not aware of?!

ps: sorry for my english :expressionless:

I’ve heard that emscripten is getting pressure to go ahead with their LLVM 4 upgrade before the Rust upgrade is complete.

This will likely happen, and the outcome for us is that it will invalidate all existing instructions for installing emscripten with Rust - the ‘incoming’ branch of their SDK will not be compatible with Rust master, and instead Rust users will need to install a particular point release.

Can anybody confirm and post working instructions for using Rust with the latest point release? My intent will be to disseminate that info as widely as we can, give emscripten the go-ahead, then deal with the fallout.

While I’m thinking about it, I came up with a seemingly good use case for wasm over the weekend, but don’t expect I can carry the project to completion, if somebody else wanted to.

This blog post laid out simple rules for validating the complexity of passwords, and one if it’s biggest points is that people should deny users the ability to use known common passwords. Basically, these days it is best practice to use the many leaked password lists as a blacklist, since users employing these passwords are trivially targeted.

So the idea here is to take the fst crate and encode that giant password list into a hopefully small FST, and do the search fast and compactly. Create a C interface so anybody can use it server-side, then bind that C interface to a JS interface via wasm so anybody can use it client-side. Package it up to produce builds for common platforms and do a ‘Show HN’ to get some karma.

I did a prototype over the weekend but seems likely won’t get much farther any time soon: https://github.com/brson/pwrabs

2 Likes

It still works with a released Emscripten version. So we just need to point to which version that is (my local install is v1.37.5, which works for latests Rust stable/nightly just fine)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.