Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.

Sign Up

Articles related to "rust"

Building a fast Electron app with Rust

  • The specific performance numbers vary between events, but this trace is typical: Rust takes a few milliseconds to do the “actual work”, the majority of the time is taken up by rendering, and the entire JavaScript execution consistently finishes under 16ms.
  • For an entirely data-driven application like Finda, having the ability to visually sketch and play in the production medium is essential — it’s impossible to effectively prototype a search-based interaction by pushing pixels around a graphic design tool.
  • Electron makes it easy to build and distribute a desktop app, shielding me from the tedious details of font rendering and low-level OS hotkey and window APIs. Rust makes it easy to write fast, safe, low-level data structures, and encourages me to think about memory and performance in a way that I’m normally oblivious to when wearing my usual JavaScript / ClojureScript hat.

save | comments | report | share on

Making WebAssembly better for Rust and for all languages

  • By targeting WebAssembly, Rust can run on the web just like JavaScript.
  • Web developers need to be able to use WebAssembly as if it were JavaScript.
  • If you add a few annotations to your Rust code, it will automatically create the code that’s needed (on both sides) to make more complex types work.
  • Plus, if we’ve added any npm dependencies, we need to put those into the package.json manifest file.
  • Make it easy to add the WebAssembly package as a dependency… to include it in JS module dependency graphs.
  • That’s because bundlers reduce the number of requests that you have to make for module files, which means it takes less time to download your code.
  • We’ll need to add some features to WebAssembly to make it easier for bundlers to emulate ES modules.

save | comments | report | share on

Repl.It 1.0: IDE that Grows from Playgrounds to Fullstack Apps

  • If you want to use files, write to files, split your code into modules, etc., you just do that and behinds the scenes the environment will switch to one where you're interacting with the filesystem.
  • You use it to listen on a port, any port you'd like; we'll detect that, host your server/repl on your subdomain (forever!) and that's it you're developing/deploying an application.
  • We also know that not all applications will grow incrementally so in typical one-click-start fashion we've pre-setup a Django, Rails, Express, and Sinatra apps.
  • serverless apps are unique in that they're stateful and that the same repl, same protocol, same everything, that you use in development is deployed and running in production.
  • After getting user-interest @pyelias is starting to explore building a full stack application using Django.

save | comments | report | share on

Rust's 2018 roadmap

  • Part of the goal with the Rust 2018 release is to provide high quality documentation for the full set of new and improved features and the idioms they give rise to.
  • The Rust Programming Language book has been completely re-written over the last 18 months, and will be updated throughout the year as features reach the stable compiler.
  • Building on our work from last year, we will publish a 1.0 version of the Rust API guidelines book, continue pushing important libraries to 1.0 status, improve discoverability through a revamped cookbook effort, and make heavy investments in libraries in specific domains—as we’ll see below.
  • The roadmap does not stipulate exactly what these resources should look like — probably there should be several kinds — but commits us as a community to putting significant work into this space, and ending the year with some solid new material.

save | comments | report | share on

Writing a Microservice in Rust

  • With microservice, I mean an application that speaks HTTP, accepts requests, speaks to a database, returns a response (possibly serving HTML), packaged up in a Docker container and ready to be dropped somewhere in the cloud.
  • Since we’re building a chat application, the two kinds of requests we’ll want to handle are POST requests, with form data containing the user’s name and the message, and GET requests with optional before and after parameters to filter by time.
  • We’ll accept POST requests to our service’s root path ("/") and expect them to contain a username and message field in their form data.
  • In such a case, parse_query will return an error message, which we can forward to the make_error_response function we wrote earlier.
  • If the messages option contains a value, we can pass the messages on to render_page, which will return an HTML page that forms the body of our response, showing the messages in a simple HTML list.

save | comments | report | share on

Should you Rust in embedded yet?

  • Rust man­aged to re­duce pres­ence of these bugs in the user­-space soft­ware and is well po­si­tioned to work its ma­gic on em­bed­ded firm­ware as well.
  • Be­fore re­writ­ing all your em­bed­ded pro­jects in Rust, it is prudent to con­sider Rust’s sup­port for your hard­ware.
  • Among the ar­chi­tec­tures nat­ively sup­por­ted by the Rust com­piler ARM and MSP430 are the ones in­ter­est­ing for em­bed­ded use cases.
  • Re­gisters, how­ever are not the end of the story… As I men­tioned earli­er, man­u­fac­turer lib­rar­ies also provide con­veni­ence lib­rary func­tions as well as ex­ample driver im­ple­ment­a­tions.
  • Even then, if the pure Rust lib­rar­ies do not serve your needs well enough, Rust’s great FFI sup­port provides all means ne­ces­sary to in­clude the pop­u­lar C lib­rar­ies into your pro­ject.
  • Minor changes to, say, link­ing or code gen­er­a­tion, while com­pat­ible in the user­-space world, may of­ten cause is­sues for em­bed­ded firm­ware.

save | comments | report | share on