From 39312517ade52f42d47b6c4a5ac5718bedb72c41 Mon Sep 17 00:00:00 2001 From: Thad Kerosky Date: Tue, 1 Dec 2020 02:25:04 -0500 Subject: [PATCH] add license.md, fix readme, use better compile_flags --- .travis.yml | 1 - LICENSE.md | 20 ++++++++++++++++++++ anypiajs/CMakeLists.txt | 4 ++-- onlybuild-emscripten-anypiab-mac.sh | 4 ++-- readme.md | 20 ++++++++++++++++---- 5 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 LICENSE.md diff --git a/.travis.yml b/.travis.yml index cd284ba..978f775 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,7 +53,6 @@ matrix: homebrew: packages: - cmake - - boost - emscripten script: # Needed to use Homebrew's emscripten diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..5991187 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,20 @@ +# License + +We waive copyright and related rights in the work worldwide through the CC0 1.0 Universal public domain dedication in an effort to make this useful in the United States Government if desired. + +## CC0 1.0 Universal Summary + +This is a human-readable summary of the [Legal Code (read the full text)](https://creativecommons.org/publicdomain/zero/1.0/legalcode). + +### No Copyright + +The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. + +You can copy, modify, distribute, and perform the work, even for commercial purposes, all without asking permission. + +### Other Information + +In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights. + +Unless expressly stated otherwise, the person who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law. When using or citing the work, you should not imply endorsement by the author or the affirmer. + diff --git a/anypiajs/CMakeLists.txt b/anypiajs/CMakeLists.txt index 395801d..19a80a9 100644 --- a/anypiajs/CMakeLists.txt +++ b/anypiajs/CMakeLists.txt @@ -29,7 +29,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Emscripten) endif() # Create .html launcher as well - set(CMAKE_EXECUTABLE_SUFFIX ".html") + set(CMAKE_EXECUTABLE_SUFFIX ".mjs") endif() add_subdirectory(../oactobjs32/misc ${CMAKE_BINARY_DIR}/misc) @@ -64,7 +64,7 @@ set(EXPORTED_RUNTIME_METHODS "-s EXTRA_EXPORTED_RUNTIME_METHODS=\"['ccall', 'cwr add_definitions(-DWEB_ASSEMBLY) -set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-s USE_BOOST_HEADERS=1" LINK_FLAGS "-s USE_BOOST_HEADERS=1 --bind ${EXPORTED_FUNCTIONS} ${EXPORTED_RUNTIME_METHODS}") +set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-s USE_BOOST_HEADERS=1" LINK_FLAGS "-s USE_BOOST_HEADERS=1 -s EXPORT_ES6=1 -s USE_ES6_IMPORT_META=0 -s ENVIRONMENT=web -MODULARIZE=1 -s WASM=1 --bind ${EXPORTED_FUNCTIONS} ${EXPORTED_RUNTIME_METHODS}") #set(EMCC_CFLAGS "${EMCC_CFLAGS} ") #set(EMCC_CFLAGS "${EMCC_CFLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']") diff --git a/onlybuild-emscripten-anypiab-mac.sh b/onlybuild-emscripten-anypiab-mac.sh index 3b2209e..037923a 100755 --- a/onlybuild-emscripten-anypiab-mac.sh +++ b/onlybuild-emscripten-anypiab-mac.sh @@ -1,8 +1,8 @@ export LLVM=/usr/local/opt/emscripten/libexec/llvm/bin export BINARYEN=/usr/local/opt/binaryen -curl -L -O "https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.zip" -unzip -q boost_1_64_0.zip +#curl -L -O "https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.zip" +#unzip -q boost_1_64_0.zip cd boost_1_64_0 ./bootstrap.sh diff --git a/readme.md b/readme.md index 62da7b4..814e14d 100644 --- a/readme.md +++ b/readme.md @@ -1,8 +1,20 @@ -# Official Social Security Calculator javascript port project +# AnyPIA Social Security Calculator javascript port project +## AnyPIA-JS wrapper of the Official C++ AnyPIA -Sister project of -- https://github.com/bslabs/anypiamac -- https://github.com/codeforboston/windfall-elimination/ +This repository takes the most updated Social Security [Detailed Calculator](https://ssa.gov/OACT/anypia/anypia.html) Windows-based tool, and wraps it with a JSON API, and repackages it using WebAssembly (WASM) so that it can be used as part of a website. No data is sent away from the user's browser. + +The affiliated [React app](https://github.com/codeforboston/windfall-elimination/) was created to help retirees affected by the Social Security Windfall Elimination Provision (WEP) understand their benefits with a walkthrough. This Detailed Calculator's results for a retiree are shown as one of two options available in the app. + +image + +**Example usage of AnyPIA-JS (middle) alongside the original AnyPIA (right) and the React app (left)** + + +## Documentation +- Deeper [non-technical introduction](https://github.com/codeforboston/windfall-elimination/blob/develop/src/library/pia/README-nontechnical.md) to this effort. +- See technical details of both [AnyPIA-JS and PiaFormat.ts](https://github.com/codeforboston/windfall-elimination/tree/develop/src/library/pia) for use of the (originally Windows-based) Social Security [Detailed Calculator](https://ssa.gov/OACT/anypia/anypia.html) from within your javascript app. + +Also a sister project of https://github.com/bslabs/anypiamac ## Installing and building - On Windows, Install [Choco](https://chocolatey.org/install) first, then use `.\installbuild-windows.bat`