diff --git a/R/compile.R b/R/compile.R index 9d64aa7..9363d6d 100644 --- a/R/compile.R +++ b/R/compile.R @@ -14,13 +14,6 @@ ts_compile.ts_function <- function(f, name = deparse(substitute(f)), ...) { sprintf("const %s = R.ocap([%s], %s]);", name, fn_args, result$r_type) } -# #' @export -# ts_compile.ts_overload <- function(f, file = NULL, name = deparse(substitute(f))) { -# cmt <- sprintf("\n// %s overloads", name) -# oloads <- sapply(f, ts_compile, name = name) -# paste(cmt, paste(oloads, collapse = "\n"), sep = "\n") -# } - #' @export ts_compile.character <- function( f, diff --git a/README.Rmd b/README.Rmd index 0d8f6b6..e0725f2 100644 --- a/README.Rmd +++ b/README.Rmd @@ -84,6 +84,13 @@ type App = { }; ``` +Besides generating the schema as shown above, the app object can also be 'deployed' using Rserve: + +```r +ts_deploy(app, port = 6311, daemon = FALSE) +# listening on port 6311 +``` + ## State of the project Here's what's currently working: diff --git a/tests/testthat/test-functions.R b/tests/testthat/test-functions.R index 0bde1cd..369fd80 100644 --- a/tests/testthat/test-functions.R +++ b/tests/testthat/test-functions.R @@ -65,4 +65,8 @@ test_that("function with complex return types", { expect_silent(s$set$call(100:200)) expect_gte(s$get$call(1), 100) + + # you would then 'deploy' this as an App that + # doesn't require the $call methods + # e.g., sampler(1:10)$get(5) })