-
Notifications
You must be signed in to change notification settings - Fork 98
Description
Hi Fletcher, Everyone.
I've been working with MultiMarkdown since 2016, constantly talking to Fletcher via email.
Since Fletcher doesn't actively use Swift, I eventually created a fork of MultiMarkdown, compatible with Swift Package Manager (https://github.com/slsrepo/multimarkdown-spm).
Since then, I used the fork extensively in my apps and other Swift projects (including Server side projects using Vapor and/or NIO).
In November, following the removal of the old outdated package manifest and the changes to the project structure, I updated my fork accordingly and Fletcher suggested bringing the repo up for discussion here for other Swift users so we can establish some "best practices" and validate what works and doesn't in order to merge the fork back into the main repo.
The changes required to allow building with Swift are few, mainly related to the disabling of the token pool and disabling CURL while building for iOS, but to make this change additive and allow building Swift alongside CMake (and not instead of it), The changed source files in the fork live in the "swift" folder instead of "src".
This should also make it easy for Fletcher to automate the changes, by making CMake update the files in the "swift" folder automatically.
This will also make integration with Xcode easier and solve several of the issues linked below, since you wouldn't need to build the project manually any more.
The fork includes 3 Swift Packages: The regular libMultiMarkdown C library, MultiMarkdownSPM which includes Swift functions for the C library (alongside a class useful for implementing syntax highlighting), and mmd-swift which is an executable demo of the packages at work.
Relevant Links
- This is the forked repo - multimarkdown-spm (https://github.com/slsrepo/multimarkdown-spm), You can test it in your project following the instructions in README.md. It's straightforward (With Xcode, you just need to add the repo link as a Swift Package) and tested with every Swift version from 4.2 up to 5.3.
- This branch of the fork (slsrepo:swiftpm-support-pr) is ready for a pull request. I'm waiting for your further feedback before submitting the pull request.
And here is a list of the related issues solved by using the fork:
#88
#89
#92
#95
#101
#170
#187
#199
Looking forward to hear/read your thoughts :)