diff --git a/Cargo.lock b/Cargo.lock index b938468..0770031 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,7 +16,7 @@ checksum = "b03f7fbd470aa8b3ad163c85cce8bccfc11cc9c44ef12da0a4eddd98bd307352" [[package]] name = "spl" -version = "0.0.3" +version = "0.0.4" dependencies = [ "once_cell", "readformat", diff --git a/Cargo.toml b/Cargo.toml index 5a4957e..fa4e422 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spl" -version = "0.0.3" +version = "0.0.4" edition = "2021" description = "Stack Pogramming Language: A simple, concise scripting language." license = "MIT" diff --git a/src/runtime.rs b/src/runtime.rs index 8aa66a7..fc58c29 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -1060,7 +1060,9 @@ pub fn find_in_splpath(path: &str) -> Result { } else { match path { "std.spl" => Err(stdlib::STD.to_owned()), + "net.spl" => Err(stdlib::NET.to_owned()), "iter.spl" => Err(stdlib::ITER.to_owned()), + "http.spl" => Err(stdlib::HTTP.to_owned()), "stream.spl" => Err(stdlib::STREAM.to_owned()), _ => Ok(path.to_owned()), } diff --git a/src/std_fns.rs b/src/std_fns.rs index 0d2a4a0..41e604f 100644 --- a/src/std_fns.rs +++ b/src/std_fns.rs @@ -592,7 +592,9 @@ pub fn import(stack: &mut Stack) -> OError { .unwrap_or(s.as_str()) { "std.spl" => Some(stdlib::STD), + "net.spl" => Some(stdlib::NET), "iter.spl" => Some(stdlib::ITER), + "http.spl" => Some(stdlib::HTTP), "stream.spl" => Some(stdlib::STREAM), _ => None, }; diff --git a/src/stdlib.rs b/src/stdlib.rs index 050d4e6..6b5bdd5 100644 --- a/src/stdlib.rs +++ b/src/stdlib.rs @@ -1,3 +1,5 @@ pub const STD: &str = include_str!("../std.spl"); +pub const NET: &str = include_str!("../net.spl"); pub const ITER: &str = include_str!("../iter.spl"); +pub const HTTP: &str = include_str!("../http.spl"); pub const STREAM: &str = include_str!("../stream.spl");