Can Alexa Say 'Hello World' in Rust?

DZone 's Guide to

Can Alexa Say 'Hello World' in Rust?

Alexa skills are coded in a programming language that converts the request and response in a JSON format.

· IoT Zone ·
Free Resource

What Is Amazon Alexa?

amazon alexa

Amazon Alexa is a voice assistant. It answer questions, schedule events, play songs, turn on and off your smart lights, your AC etc, and it can even remember where your car keys are. The list is endless..... It does all these things with just one input from you - YOUR VOICE.

Amazon came with some really SMART devices called Amazon Echo and Amazon Echo Dot, which were sold like hot cakes as soon as it hit the market. As they advertised, it was called just a SMART SPEAKER. Yesssss, all this was sold under the name of a SMART SPEAKER. So underrated it was.....

Alexa Skill

Just as your mobile has applications(or apps) Alexa apps are called SKILLS and the analogy continues with the coding part too. Yeah, Alexa skills are coded in a programming language that converts the request and response in a JSON format. Confused?????

Don't be!

Why Rust and Alexa Can Be the Best of Friends?

Alexa skills requires the response in a jiffy and for that to happen we need our back end programming language to be capable enough to handle a large number of requests and be fast at the same time.

This takes us to search for a programming language that is blazingly fast and hey remember what Rust Programming Language advertised...

why rust

So, our search has ended too early, Nah??


AWS Lambda

AWS Lambda

Now everyone knows this fellow from Amazon, it is Lambda. We write functions and we trigger Lambda to use that function.

But it supports only 5 languages and surprisingly Rust is not one of them......

confused face

AWS Lambda is an integral part of any Alexa Skill but it does not support our BLAZINGLY FAST LANGUAGE. But, what it does support is the Custom Run-time and we will try to accommodate RUST in that. 

Quick Skill Development

As you go to the developer account of Amazon Alexa, you will find an option for a custom skill. Just click on that and begin with your skill development. Let's take a deep dive into the different options available there:

  1. Wake Word
  2. Starting Phrase
  3. Skill Invocation Name
  4. Utterances

alexa ideas

Let's discuss all these, one by one, for a better understanding.

Wake Word

Wake word, as the name suggests, wakes up the device and tells the device that the user wants to interact with the device.

As of Now, it supports the following wake words

  1. Alexa (The most common one)
  2. Amazon
  3. Computer (For the old fashioned ones!)
  4. Echo

Starting Phrase

Starting phrases like ask, tell, say, search, open, launch, play, run etc. are used before the SKILL INVOCATION NAME to tell the device to LAUNCH a skill.

Starting Phrases may also be called as a Launch Request for a Skill and it depends on the language for which the skill has been designed. The above stated starting phrases are applicable only when the skill's language has been assigned as English.

Skill Invocation Name

This is the name of your skill which user should know! As soon as user speaks this name, the skill starts working. It should be simple and easy to speak phrase of 2-3 words.


More the number of utterances, more the skill becomes user friendly. A wide range of utterances should be pre-defined for the ease of the users.

This article is stretching a lot, so I will stop here. In my next article, I would build a skill and show a little demo with an Amazon echo device.

Thanks for reading!

alexa, amazon echo, aws lambda, iot, rust, rust language, smart home automation

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}