Add wasm support (#2199)

* Working towards a PoC for wasm

* Move bson and sqlite to plugins

* proof of concept now working

* tests are green

* Add CI test for --no-default-features

* Fix some tests

* Fix clippy and windows build

* More fixes

* Fix the windows build

* Fix the windows test
This commit is contained in:
Jonathan Turner
2020-07-18 13:59:23 +12:00
committed by GitHub
parent dbe0effd67
commit d8594a62c2
59 changed files with 781 additions and 448 deletions

View File

@ -127,6 +127,7 @@ fn filesystem_change_current_directory_to_parent_directory_after_delete_cwd() {
})
}
#[cfg(feature = "dirs")]
#[test]
fn filesystem_change_to_home_directory() {
Playground::setup("cd_test_8", |dirs, _| {

View File

@ -54,6 +54,7 @@ fn parses_csv() {
// what appears to be an issue in the bson library that is under investigation.
//
#[cfg(feature = "bson")]
#[test]
fn parses_bson() {
let actual = nu!(
@ -64,6 +65,7 @@ fn parses_bson() {
assert_eq!(actual.out, "hello");
}
#[cfg(feature = "bson")]
#[test]
fn parses_more_bson_complexity() {
let actual = nu!(
@ -130,6 +132,7 @@ fn parses_more_bson_complexity() {
// 4 │
// ━━━┷━━━━━━
#[cfg(feature = "sqlite")]
#[test]
fn parses_sqlite() {
let actual = nu!(

View File

@ -1,3 +1,4 @@
mod bool;
mod dice;
#[cfg(feature = "uuid_crate")]
mod uuid;

View File

@ -15,6 +15,7 @@ fn sets_the_column() {
assert_eq!(actual.out, "0.7.0");
}
#[cfg(features = "inc")]
#[test]
fn sets_the_column_from_a_block_run_output() {
let actual = nu!(

View File

@ -1,4 +1,7 @@
use nu_test_support::{nu, pipeline};
use nu_test_support::nu;
#[cfg(feature = "sqlite")]
use nu_test_support::pipeline;
#[test]
fn filters_by_unit_size_comparison() {
@ -40,6 +43,7 @@ fn where_not_in_table() {
assert_eq!(actual.out, "4");
}
#[cfg(feature = "sqlite")]
#[test]
fn explicit_block_condition() {
let actual = nu!(
@ -58,6 +62,7 @@ fn explicit_block_condition() {
assert_eq!(actual.out, "4253");
}
#[cfg(feature = "sqlite")]
#[test]
fn binary_operator_comparisons() {
let actual = nu!(
@ -136,6 +141,7 @@ fn binary_operator_comparisons() {
assert_eq!(actual.out, "42");
}
#[cfg(feature = "sqlite")]
#[test]
fn contains_operator() {
let actual = nu!(