Giter Club home page Giter Club logo

pure-swift-module-example's Introduction

Pure Swift Module Example

This is a project based on this blog post that demonstrates how to create a module using only Swift.

I found the example a bit out of date (even though it's from 8/11/21) and was having some difficulty getting it to work. With some experimentation and web searching, I was able to come up with a example that works for both macOS and Linux (tested on Swift-5.7-DEV on Fedora 36).

Files

build-n-test.sh

Run this to build the module/library as well as build and run its accompanying test program (test.swift).

This is the file to really look at. It has all the magic incantations that are needed to properly build and run circa Swift 5.6 and 5.7-DEV (on Linux).

ZLogger.swift

A Swift file that contains both a class and a function that are available to other programs

test.swift

Test program that imports the ZLogger framework.

pure-swift-module-example's People

Contributors

tachoknight avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.