Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Commit

Permalink
remove dependency on rust-embed, bump to 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
poga committed Aug 8, 2018
1 parent 76fce47 commit 0a0f04a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
language: rust
env:
- RUSTFLAGS="-D warnings"
matrix:
include:
- rust: stable
Expand Down
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "actix-lua"
version = "0.2.0"
version = "0.3.0"
authors = ["Poga Po <[email protected]>"]
description = "Define Actix actor with Lua"
repository = "https://github.com/poga/actix-lua"
Expand All @@ -21,7 +21,6 @@ futures = "0.1"
tokio = "0.1"
rlua = "0.14"
uuid = { version = "0.6", features = ["v4"] }
rust-embed = "3.0"

[dev-dependencies]
futures-timer = "0.1"
9 changes: 2 additions & 7 deletions src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ use message::LuaMessage;

use builder::LuaActorBuilder;

#[derive(RustEmbed)]
#[folder = "src/lua/"]
struct Asset;

/// Top level struct which holds a lua state for itself.
///
/// `LuaActor` exposed most of the actix context API to the lua enviroment.
Expand Down Expand Up @@ -58,9 +54,8 @@ impl LuaActor {
stopped: Option<String>,
) -> Result<LuaActor, LuaError> {
let vm = Lua::new();
// vm.eval::<()>(&script, Some("Init"))?;
let prelude = Asset::get("prelude.lua").unwrap();
vm.eval::<()>(&str::from_utf8(&prelude).unwrap(), Some("Prelude"))?;
let prelude = include_str!("lua/prelude.lua");
vm.eval::<()>(prelude, Some("Prelude"))?;
{
let load: Function = vm.globals().get("__load").unwrap();
if let Some(script) = started {
Expand Down
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ extern crate rlua;
extern crate tokio;
extern crate uuid;

#[macro_use]
extern crate rust_embed;

#[cfg(test)]
extern crate futures_timer;

Expand Down

0 comments on commit 0a0f04a

Please sign in to comment.